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

# How APIXO Works

> Understand APIXO's API families, task flow, routing, and keys

APIXO has two main API patterns:

* **Generation APIs** for image, video, and audio models. These are async because generation can take seconds or minutes.
* **LLM Gateway** for Claude, OpenAI, and Gemini compatible APIs. These behave like direct provider API calls.

## API families

| API family      | Base URL                      | Best for                                         | Result pattern                               |
| --------------- | ----------------------------- | ------------------------------------------------ | -------------------------------------------- |
| Generation APIs | `https://api.apixo.ai/api/v1` | Images, videos, music, and other generated media | `generateTask` plus `statusTask` or webhooks |
| LLM Gateway     | `https://llm.apixo.ai`        | Chat, coding tools, agents, and LLM apps         | Direct non-streaming or streaming response   |

## Generation task flow

1. Submit a task to `POST /generateTask/{model}`.
2. Receive a `taskId`.
3. Poll `GET /statusTask/{model}?taskId=...` or receive a webhook.
4. Read the final result when `state` is `success`.

This flow is used by image, video, and audio models because provider generation time is not instant.

## LLM Gateway flow

1. Pick the compatible API format your app already supports.
2. Set the base URL to `https://llm.apixo.ai`.
3. Use your APIXO API key in the provider-compatible auth header.
4. Keep the official request body and model field.

Use [LLM Gateway Overview](/llm) when you are connecting official SDKs or third-party apps.

## Routing strategies

APIXO routing is configured per API key:

| Strategy | Best for                   | Behavior                                     |
| -------- | -------------------------- | -------------------------------------------- |
| Auto     | Most users                 | Value-first with failover to Official routes |
| Value    | Cost-sensitive workloads   | Partner routes optimized for price           |
| Official | Mission-critical workloads | Official or officially authorized routes     |

See [Routing Strategies](/concepts/routing-strategies) for details.

## Key pages

<CardGroup>
  <Card title="Quickstart" href="/quickstart">
    Generate your first image with the async task flow.
  </Card>

  <Card title="Generation API Overview" href="/models">
    Browse image, video, and audio model API docs.
  </Card>

  <Card title="LLM Gateway Overview" href="/llm">
    Use official LLM API formats through APIXO.
  </Card>

  <Card title="Errors" href="/api-reference/errors">
    Debug failed requests and task failures.
  </Card>
</CardGroup>
