> ## 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

# Use AIsa with the OpenAI, Anthropic, and Gemini SDKs

> Keep your existing SDK and point it at AIsa: change the base URL and the API key. Covers OpenAI Chat Completions and Responses, Anthropic Messages, and Gemini generateContent.

AIsa is compatible with standard OpenAI, Anthropic, and Gemini SDK formats. You can use your existing code and libraries by changing two settings: the **base URL** and your **API key**.

| SDK | Base URL | Supported Routes | Auth Header |
| - | - | - | - |
| OpenAI | `https://api.aisa.one/v1` | `/chat/completions`, `/responses`, `/embeddings`, `/images/generations` | `Authorization: Bearer $AISA_API_KEY` |
| Anthropic | `https://api.aisa.one` | `/v1/messages` | `x-api-key: $AISA_API_KEY` |
| Google Gen AI (Gemini) | `https://api.aisa.one` | `/v1beta/models/{model}:generateContent` | Pass `x-api-key: $AISA_API_KEY` in headers |

Not every model supports every route. The [model catalog](https://aisa.one/docs/guides/models.md) lists supported routes per model; calling an unsupported route returns `400 model_route_not_supported`.

## OpenAI SDK

```python Python theme={null}
from openai import OpenAI
import os

client = OpenAI(api_key=os.environ["AISA_API_KEY"], base_url="https://api.aisa.one/v1")

chat = client.chat.completions.create(
    model="gpt-5.4-mini",
    messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(chat.choices[0].message.content)

# The Responses API works on the same client.
resp = client.responses.create(model="gpt-5.4-mini", input="Say hello in five words.")
print(resp.output_text)
```

```typescript TypeScript theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AISA_API_KEY,
  baseURL: "https://api.aisa.one/v1",
});

const chat = await client.chat.completions.create({
  model: "gpt-5.4-mini",
  messages: [{ role: "user", content: "Say hello in five words." }],
});
console.log(chat.choices[0].message.content);
```

Models from other families - Claude, Gemini, DeepSeek, Qwen, and more - are also reachable through Chat Completions with their AIsa model ID.

## Anthropic SDK

The Anthropic SDK appends `/v1/messages` itself, so the base URL has no `/v1`.

```python Python theme={null}
import anthropic
import os

client = anthropic.Anthropic(api_key=os.environ["AISA_API_KEY"], base_url="https://api.aisa.one")

message = client.messages.create(
    model="claude-haiku-4-5-20251001",
    max_tokens=256,
    messages=[{"role": "user", "content": "Say hello in five words."}],
)
print("".join(block.text for block in message.content if block.type == "text"))
```

```typescript TypeScript theme={null}
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.AISA_API_KEY,
  baseURL: "https://api.aisa.one",
});

const message = await client.messages.create({
  model: "claude-haiku-4-5-20251001",
  max_tokens: 256,
  messages: [{ role: "user", content: "Say hello in five words." }],
});
for (const block of message.content) {
  if (block.type === "text") console.log(block.text);
}
```

The same setting works for tools built on the Anthropic SDK, such as Claude Code: see [Run Claude Code on AIsa models](https://aisa.one/docs/guides/tutorials/use-aisa-in-claude.md#claude-code).

## Google Gen AI SDK (Gemini)

AIsa reads the key from `Authorization: Bearer` or `x-api-key`, not from Google's `x-goog-api-key` header, so pass it as an extra header.

```python Python theme={null}
from google import genai
from google.genai import types
import os

key = os.environ["AISA_API_KEY"]
client = genai.Client(
    api_key=key,
    http_options=types.HttpOptions(base_url="https://api.aisa.one", headers={"x-api-key": key}),
)

response = client.models.generate_content(model="gemini-3.8-flash", contents="Say hello in five words.")
print(response.text)
```

## Other frameworks

Any framework that lets you set an OpenAI-compatible base URL - LangChain, LlamaIndex, the Vercel AI SDK, LiteLLM - works the same way: base URL `https://api.aisa.one/v1`, key `AISA_API_KEY`.

## Next steps

> [card] [Model catalog](https://aisa.one/docs/guides/models.md)
>
> Model IDs, routes, and context windows.

> [card] [Chat Completions reference](https://aisa.one/docs/api-reference/chat/post_chat-completions.md)
>
> Every parameter, with an interactive playground.


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