> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Get an API Key and Make Your First Call

> Create an AIsa account, generate an API key, and make your first request to a model and a data API with curl.

This page takes you from no account to a working request in a few minutes. Everything here uses one API key and plain HTTP.

## 1. Create an account and a key

1. Sign up at [console.aisa.one](https://console.aisa.one) with email, Google, or GitHub. New accounts start with free credit for testing.
2. Open [API Keys](https://console.aisa.one/api-keys). A key has already been created for you; copy it. Keys start with `sk-`.
3. Store it as an environment variable rather than in code:

```bash theme={null}
export AISA_API_KEY="sk-..."
```

You can create more keys later - one per app or environment is a good habit - and cap how much each key may spend. See [Authentication](https://aisa.one/docs/guides/authentication.md).

## 2. Call a model

```bash theme={null}
curl https://api.aisa.one/v1/chat/completions \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4-mini",
    "messages": [{"role": "user", "content": "Explain an AI gateway in one sentence."}]
  }'
```

The response follows the OpenAI Chat Completions format: the answer is in `choices[0].message.content`, and `usage` reports the tokens that were billed. Swap `model` for any ID from the [model catalog](https://aisa.one/docs/guides/models.md) - `claude-haiku-4-5-20251001`, `deepseek-v4.1-flash`, `gemini-3.8-flash` - without changing anything else.

> [!NOTE]
>
> Always send `Content-Type: application/json` with a JSON body; without it the request is rejected.

## 3. Call a data API

Data APIs live under `https://api.aisa.one/apis/v1` and use the same API key. For example, to run a web search:

```bash theme={null}
curl https://api.aisa.one/apis/v1/tavily/search \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "latest developments in AI agents"}'
```

Browse the [API Reference](https://aisa.one/docs/api-reference.md) for the full list of endpoints (finance, social, search, SEO, and more), each with an interactive playground. Data API calls are billed: some endpoints charge a flat fee per call, others are metered by what the request returns. See [Billing & Credits](https://aisa.one/docs/guides/pricing.md) for details on quotes and spending caps.

## 4. Check what you spent

Every call appears in [Console → Usage & Logs](https://console.aisa.one/logs) with its endpoint, model, tokens, and cost. To read the same totals from code:

```bash theme={null}
curl --get https://api.aisa.one/v1/usage \
  -H "Authorization: Bearer $AISA_API_KEY" \
  --data-urlencode "start_time=$(($(date +%s) - 86400))"
```

## Next steps

> [card] [OpenAI / Anthropic SDK](https://aisa.one/docs/get-started/sdk-compatibility.md)
>
> Use your existing SDK by changing the base URL and key.

> [card] [Connect your agent](https://aisa.one/docs/agent-quickstart.md)
>
> Give Claude Code, Codex, or Cursor AIsa as a tool over MCP.

> [card] [Billing & Credits](https://aisa.one/docs/guides/pricing.md)
>
> How tokens and calls are billed, quotes, and spend caps.

> [card] [Console](https://aisa.one/docs/guides/dashboard/overview.md)
>
> Balance, keys, playground, and per-request logs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.