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

# Welcome to APIPod

> Generate images and videos through APIPod's asynchronous media APIs.

APIPod provides one asynchronous task API for the image and video models enabled in your account. Your application chooses a public APIPod model ID; APIPod handles provider selection, authentication, billing, task execution, and request tracing behind the same API host.

```text theme={null}
https://api.apipod.ai
```

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Create and poll a GPT Image 2 task with a complete working request.
  </Card>

  <Card title="Authentication" icon="key-round" href="/authentication">
    Create an API key, check account access, and send credentials safely.
  </Card>

  <Card title="Image models" icon="image" href="/gpt-image-2/gpt-image-2">
    Browse image-generation and image-editing models with their exact request schemas.
  </Card>

  <Card title="Video models" icon="video" href="/veo/3-1-fast">
    Browse text, image, and reference-driven video generation models.
  </Card>
</CardGroup>

## What you can build

| Workload         | APIPod entry point            | Request behavior                                      |
| ---------------- | ----------------------------- | ----------------------------------------------------- |
| Image generation | `POST /v1/images/generations` | Accepts a request and returns a `task_id` for polling |
| Video generation | `POST /v1/videos/generations` | Accepts a request and returns a `task_id` for polling |
| Price estimate   | `POST /v1/pricing/estimate`   | Estimates a request cost before execution             |

Image and video calls are deliberately asynchronous: the create response acknowledges the task, and a later status response delivers the generated asset.

## Media task workflow

Choose the endpoint that matches the generated asset, then open the exact model page before building the request:

* **Image tasks** use `/v1/images/generations` and `/v1/images/status/{task_id}`.
* **Video tasks** use `/v1/videos/generations` and `/v1/videos/status/{task_id}`.
* **Model pages** define the accepted prompt, media inputs, aspect ratio, duration, resolution, and other model-specific fields.
* **Webhooks** can deliver terminal task events when continuous polling is not practical.

## A request lifecycle that matches APIPod

1. **Authenticate.** Send `Authorization: Bearer <API_KEY>` from a server-side environment. `GET /v1/account/status` is a lightweight credential and account probe.
2. **Discover.** Browse the image and video groups in the API Reference or use the Models link in the header to open the live product catalog.
3. **Select the contract.** Use the model ID exactly as documented, then validate against that page's OpenAPI panel. A model's fields and limits can differ from another model in the same family.
4. **Execute.** Create an image or video task with an `Idempotency-Key` and persist the returned `task_id`.
5. **Complete.** Poll `GET /v1/images/status/{task_id}` or `GET /v1/videos/status/{task_id}`, or configure a webhook for terminal task events.
6. **Persist and observe.** Store output assets in durable storage and log `task_id`, `X-Request-ID`, HTTP status, and machine-readable error codes.

<Note>
  A successful media create response means that APIPod accepted the task. It does not mean that generation has completed. Treat `pending` and `processing` as non-terminal states and stop only at `completed`, `failed`, or `cancelled`.
</Note>

## Production checklist

* Keep API keys on your backend, outside source control and browser bundles.
* Retry only when the operation is safe to retry. For an ambiguous media create request, reuse the same `Idempotency-Key` and unchanged JSON body.
* Use bounded exponential backoff with jitter for polling and transient `429`, `503`, or `5xx` responses.
* Persist `task_id` before background polling and copy result URLs to storage you control.
* Branch on the response status before reading `result` or error fields; preserve unknown machine codes for forward compatibility.
* Use [webhooks](/webhooks) when continuous polling is not practical, and [error handling](/error-codes) for retry and failure semantics.

<CardGroup cols={3}>
  <Card title="Async tasks" icon="clock-3" href="/asynchronous-tasks">
    Polling, terminal states, and result delivery for media generation.
  </Card>

  <Card title="API reference" icon="file-code-2" href="/gpt-image-2/gpt-image-2">
    Model-specific schemas and runnable cURL, Python, Go, Rust, and JavaScript examples.
  </Card>

  <Card title="Pricing estimate" icon="calculator" href="https://www.apipod.ai/pricing">
    Review pricing and estimate a request before spending quota.
  </Card>
</CardGroup>
