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

> Add AIsa as a remote MCP server in OpenAI's Codex CLI with one command and a browser sign-in. Optionally run Codex on AIsa models.

Codex has a built-in MCP client. Add AIsa as a remote MCP server, sign in once, and Codex can discover and call AIsa capabilities across web research, finance, social, SEO, sales, and more.

AIsa MCP server:

```txt theme={null}
https://mcp.aisa.one/mcp
```

## Prerequisites

Before you start, make sure you have:

* An AIsa account ([console.aisa.one](https://console.aisa.one)). You sign in through the browser.
* A terminal on macOS, Linux, or Windows WSL2

## 1. Install Codex

```bash theme={null}
npm install -g @openai/codex
```

Or with Homebrew:

```bash theme={null}
brew install codex
```

Verify the installation:

```bash theme={null}
codex --version
```

## 2. Add the AIsa MCP server

```bash theme={null}
codex mcp add aisa --url https://mcp.aisa.one/mcp
```

Codex detects that AIsa uses OAuth and opens your browser. Sign in to AIsa and approve access; no key is copied. On a machine without a browser, run `codex mcp login aisa --no-browser` and open the printed URL elsewhere.

> [accordion] Use your API key instead of OAuth
>
> For headless environments, export your AIsa key and tell Codex which variable holds it. Codex reads it at runtime, so the key never lands in `config.toml`:
>
> ```bash theme={null}
> export AISA_API_KEY="sk-aisa-..."
> codex mcp add aisa --url https://mcp.aisa.one/mcp --bearer-token-env-var AISA_API_KEY
> ```

## 3. Verify

```bash theme={null}
codex mcp list
```

**aisa** should be listed as `enabled`, with `OAuth` (or `Bearer token`) in the Auth column. Start a new Codex session to load the tools; inside Codex, `/mcp` shows the connected servers.

## 4. Use AIsa capabilities

```bash theme={null}
codex
```

Codex now has the AIsa tools. `search`, `list_categories`, `get_details`, `batch_get_schema`, and `batch_quote` (prices exact calls without running them) are free; `use` and `batch_use` run calls and are billed per call.

Try:

```txt theme={null}
Use AIsa capabilities to search the web and summarize the latest information about Codex CLI.
```

## Optional: run Codex on AIsa models

Codex can also use AIsa as its model provider. This needs an AIsa API key ([console.aisa.one/api-keys](https://console.aisa.one/api-keys)) exported as `AISA_API_KEY`. Add this to `~/.codex/config.toml`:

```toml theme={null}
model = "gpt-5.5"
model_provider = "aisa"

[model_providers.aisa]
name = "AIsa"
base_url = "https://api.aisa.one/v1"
env_key = "AISA_API_KEY"
wire_api = "responses"
```

* `env_key` tells Codex which environment variable holds your key.
* Codex only supports `wire_api = "responses"`, so pick a model that lists `POST /v1/responses` in the [catalog](https://aisa.one/docs/guides/models.md), such as `gpt-5.5`, `gpt-5.4`, or `gpt-5.3-codex`.

## Quick reference

| Item | Value |
| - | - |
| Add AIsa | `codex mcp add aisa --url https://mcp.aisa.one/mcp` (OAuth starts automatically) |
| Sign in again | `codex mcp login aisa` |
| Check status | `codex mcp list`, or `/mcp` inside Codex |
| API key | Not needed for MCP; optional `--bearer-token-env-var AISA_API_KEY` |
| Optional model provider | `base_url = "https://api.aisa.one/v1"`, `wire_api = "responses"` |

## Troubleshooting

| Problem | Fix |
| - | - |
| AIsa tools missing | Run `codex mcp list`. If **aisa** shows `Not logged in`, run `codex mcp login aisa`, then start a new session |
| Browser didn't open | Run `codex mcp login aisa --no-browser` and open the printed URL |
| `wire_api = "chat"` is no longer supported | Set `wire_api = "responses"` in the provider block |
| Model provider returns 401 | Confirm `AISA_API_KEY` is exported in the shell that runs Codex |
| Model provider returns 404 | Make sure `base_url` is exactly `https://api.aisa.one/v1` |
| Model not found | Use an exact model ID that supports `POST /v1/responses` in the [catalog](https://aisa.one/docs/guides/models.md) |

## Related

> [card] [Use AIsa in Claude](https://aisa.one/docs/guides/tutorials/use-aisa-in-claude.md)
>
> Add AIsa as a custom connector in Claude.

> [card] [Connect via MCP](https://aisa.one/docs/agent-quickstart.md)
>
> MCP setup for other clients.

> [card] [Model Catalog](https://aisa.one/docs/guides/models.md)
>
> Browse models that support the Responses API.


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