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

# API Reference

> One key, one base URL, every API. Browse every endpoint AIsa routes to with interactive examples.

AIsa exposes a unified API surface at `https://api.aisa.one` — OpenAI-compatible chat at `/v1` and all other APIs under `/apis/v1`. Authenticate once with your `AISA_API_KEY` and call any endpoint below — chat, video, search, market data, and more.

The sidebar groups every API by category, then by platform. To find an API by its platform name, use the A–Z index.

> [card] [Browse by platform](https://aisa.one/docs/api-reference/platforms.md)
>
> Every platform A to Z, with its category and endpoint count.

## Unified APIs

AIsa Social, AIsa Ads and AIsa commerce use one request shape across platforms. AIsa Social and AIsa Ads read and write through accounts your users connect. Start with the [Unified APIs overview](https://aisa.one/docs/resources/unified-apis.md).

> [card] [AIsa Social](https://aisa.one/docs/api-reference/aisa-social/get_aisa_social_apis_v1_social_account_groups.md)
>
> Post, schedule and reply on supported platforms, with analytics and webhooks. Reddit social accounts are coming soon.

> [card] [AIsa Ads](https://aisa.one/docs/api-reference/aisa-ads/get_aisa_ads_apis_v1_ads_accounts.md)
>
> Run campaigns on Meta, Google, TikTok, LinkedIn, Pinterest, X, Reddit and OpenAI (ChatGPT).

> [card] [AIsa commerce](https://aisa.one/docs/api-reference/aisa-commerce/get_aisa_commerce_apis_v1_commerce_amazon_categories.md)
>
> Listings, shops, keywords and reviews, with the source of each value.

## Popular APIs

> [card] [Chat API](https://aisa.one/docs/api-reference/chat/post_chat-completions.md)
>
> OpenAI-, Anthropic-, and Google-compatible chat completion endpoints.

> [card] [Search API](https://aisa.one/docs/api-reference/search/get_youtube-search.md)
>
> YouTube SERP plus Tavily search, extract, crawl, and map.

> [card] [Perplexity API](https://aisa.one/docs/api-reference/perplexity/post_perplexity-sonar.md)
>
> Sonar, Sonar Pro, Sonar Reasoning Pro, and Sonar Deep Research.

> [card] [Financial API](https://aisa.one/docs/api-reference/financial/get_analyst-estimates.md)
>
> Company fundamentals, filings, prices, insider trades, macro data.

> [card] [Twitter API](https://aisa.one/docs/api-reference/twitter/get_twitter-user-info.md)
>
> User, tweet, list, community, trend, space, and post endpoints.

> [card] [Scholar API](https://aisa.one/docs/api-reference/scholar/post_scholar-search-scholar.md)
>
> Scholar, web, smart, and explain search for research.

> [card] [Prediction Market API](https://aisa.one/docs/api-reference/prediction-market/get_polymarket-events.md)
>
> Polymarket, Kalshi, and matching-market data.

## Essentials

> [card] [Errors](https://aisa.one/docs/api-reference/errors.md)
>
> Error codes and how to handle them.

> [card] [Rate Limits](https://aisa.one/docs/api-reference/rate-limits.md)
>
> Per-endpoint limits and headers.

> [card] [Credit Balance](https://aisa.one/docs/api-reference/credits-balance.md)
>
> Read wallet balance and API-key availability.

## Settled call cost

For Integration API responses that report a settled customer debit,
`X-AISA-Customer-Cost-Micros-USD` contains a nonnegative decimal integer in
micro-USD: `1000000` means `$1.00`. A returned `0` means the reported debit is
zero. A missing or malformed header means the response did not supply a usable
settled amount; **missing does not mean free**. Do not infer a debit solely from
HTTP success or failure, a price tier, or a catalog estimate.

The gateway exposes this customer-cost header through
`Access-Control-Expose-Headers` for browser callers. Its accepted integer range
is `0` through `9223372036854775807`; use an integer/decimal representation, not a
floating-point conversion, when reconciling money. JavaScript callers should use
`BigInt` for micro-USD or preserve the decimal string.

| Response path | Cost-header policy |
| - | - |
| Metered V2 settlement | Can return both `X-AISA-Customer-Cost-Micros-USD` and `X-AISA-Provider-Cost-Micros-USD`. Provider cost is separate accounting evidence, not the customer's debit; fallback evidence may be an estimate. |
| Fixed/default settlement | Reports the settled customer debit, including zero; does not expose a new Provider-cost micro-USD header and removes an upstream-supplied one. |
| Quote, pre-settlement rejection, transport failure, or special no-charge path | A settled header may be absent. Follow the endpoint's quote or error contract; absence does not establish zero cost. |

Provider-cost headers are not part of the common browser CORS exposed-header
list. They are endpoint/strategy-specific; this page does not promise their
presence or expand their exposure. In particular, web-search-specific cost
headers are not a universal Integration API contract.

A cost quote is an estimate or bound returned before execution, not proof of a
settled charge. The `X-AISA-Max-Price-USD` request header is a spending cap, not a
reported debit. MCP result fields depend on the deployed version. When
`customer_cost_micros_usd` and `cost_usd_exact` are provided, use them to preserve
the reported amount; `cost_usd` is a numeric display and can round very large
values. Do not assume every MCP deployment supplies the exact fields. Unknown
cost remains absent, including on an error. A quoted
`estimated_cost_micros_usd` must not be substituted for a settled amount.

The following Python example accepts a case-insensitive HTTP headers mapping
(such as `requests.Response.headers`) and preserves exact decimal output:

```python theme={null}
def settled_customer_cost(headers):
    raw = headers.get("X-AISA-Customer-Cost-Micros-USD")
    if raw is None:
        return None
    value = str(raw).strip()
    if not value.isascii() or not value.isdecimal():
        return None
    micros = int(value)
    if micros > 9223372036854775807:
        return None
    return {
        "customer_cost_micros_usd": micros,
        "cost_usd_exact": f"{micros // 1000000}.{micros % 1000000:06d}",
    }
```

See [Error Codes](https://aisa.one/docs/api-reference/errors.md) for retained response formats and safe
retry handling.


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