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

# Introduction

> one-api.ai generates images and videos through one API key, one HTTP API and one command-line tool.

one-api.ai is a hosted API for image and video generation. You send a prompt, the service runs the model, and you get back a link to the finished file. A Rust command-line tool, `oneapi`, does the same from a terminal in one command.

> [card] [Quickstart](https://docs.one-api.ai/quickstart.md)
>
> Generate your first image with one request.

> [card] [Command line](https://docs.one-api.ai/cli.md)
>
> Install `oneapi` and save results straight to a file.

> [card] [Images](https://docs.one-api.ai/guides/images.md)
>
> Sizes, formats and the price per image.

> [card] [Videos](https://docs.one-api.ai/guides/videos.md)
>
> Length, resolution, draft mode and the price per second.

## How it works

Every generation is a task.

1. You `POST` a prompt to `/v1/images/generations` or `/v1/videos/generations`.
2. The service reserves the price from your credits and returns a task id.
3. The task runs in the background. You either poll `GET /v1/tasks/{id}` or ask the service to hold the call open until it finishes with `?wait=`.
4. A completed task carries a temporary link to the output file. A failed task is refunded in full.

## Models

| Model | Makes | List price |
| - | - | - |
| `z-image-turbo` | Images up to 2048 pixels | \$0.005 per image |
| `p-video` | Videos of 1 to 20 seconds at 720p or 1080p | from \$0.005 per second |

Customer keys pay list price times 104/95. See [Billing](https://docs.one-api.ai/guides/billing.md) for the exact amounts.

> [!NOTE]
>
> one-api.ai is in early access. API keys are issued on request through the [contact page](https://one-api.ai/contact).


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