# Quick start

> Original: https://api.6io.io/en/docs/get-started/ (HTML). All pages: https://api.6io.io/llms.txt

The 6io API gives access to AI models with one key and one balance in credits. Chat models work like OpenAI's: in your program or SDK you only change the address and the key. Images, video and audio are made as tasks: you submit a task, then collect the result.

"Sixio" in this documentation is the name of the API itself. Keys start with `sixio_sk_`, the request ID comes in the `X-Sixio-Request-Id` header, and one of the model groups is called `sixio`. This is our own service, not a third-party one.

## Kinds of models

A model name is a group and a name: `group/name`. The group decides what the model can do and where to send requests.

| Group | What is inside | How it works | Example name |
| --- | --- | --- | --- |
| `op` | chat models from the OpenRouter catalog | stream | `op/openai/gpt-4o-mini` |
| `vn` | Venice chat models | stream | `vn/llama-3.3-70b` |
| `fal` | images, video and audio from the fal catalog | queue | `fal/fal-ai/flux/schnell` |
| `sixio` | 6io models: Seedance, Kling, Nano Banana, GPT Image and others | queue | `sixio/flux-3/klein-text-to-image` |

Where to send requests and where to look up model parameters:

- `op` and `vn`: `POST /v1/chat/completions`. The parameters are described in the provider's documentation: [OpenRouter](https://openrouter.ai/docs/api-reference/parameters), [Venice](https://docs.venice.ai/api-reference/endpoint/chat/completions). How we work with them: [OpenRouter models](https://api.6io.io/md/en/openrouter.md), [Venice models](https://api.6io.io/md/en/venice.md).
- `fal`: `POST /native/fal/queue/<model id>`. The parameters are on the model's page on fal.ai, the API tab. More: [fal models](https://api.6io.io/md/en/fal.md).
- `sixio`: `POST /native/sixio/tasks`. The parameters are in `GET /native/sixio/models` and in the console. More: [Sixio models](https://api.6io.io/md/en/sixio.md).

The prefix is required. A model without it, or with an unknown prefix, answers `404 model_not_found`.

Request bodies for `op`, `vn` and `fal` models go to the provider as they are. So this documentation describes only what we add: prices, balance, errors, limits and retries. What the parameters of a particular model mean is in the provider's documentation, linked in the table above.

## Stream and queue

Models work in one of two ways.

- **Stream.** The answer arrives in the same connection: whole, or in parts as it is generated (`"stream": true`). Chat of `op` and `vn` works this way.
- **Queue.** The request returns an ID `req_…` at once, and you collect the result by it when it is ready: with a `GET` request or with a notification to your address ([webhooks](https://api.6io.io/md/en/webhooks.md)). `fal`, `sixio` and [background jobs](https://api.6io.io/md/en/jobs.md) (chat through the queue) work this way. Images and video take seconds to minutes, so there is no reason to keep a connection open.

In the catalogs and in the console every model has a `mode` mark: `stream` or `queue`. States in the queue are named the same everywhere: `queued` (waiting), `running` (in progress), `succeeded` (done), `failed` (not done), `unknown` (the outcome is being checked, the money is not closed yet). The exception is `fal`: its SDKs understand only fal's words (`IN_QUEUE`, `IN_PROGRESS`, `COMPLETED`), so they stayed there.

## Getting started

1. Open the [console](https://api.6io.io/console/) and sign in with a 6io account, or create one. The account is shared with 6io: the same email, password and credits.
2. Top up the API balance. On the Overview tab enter how many site credits to transfer. The API balance is also in credits, but it is a separate wallet: one site credit gives one API credit.
3. On the Keys tab press "Create key". The key is shown once, so save it right away. You can create several keys, each with its own expiry or none.
4. Put the address `https://api.6io.io/v1` and this key into your program.

## The first request

```bash
curl https://api.6io.io/v1/chat/completions \
  -H "Authorization: Bearer sixio_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "op/openai/gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 100
  }'
```

Python, the official OpenAI SDK (`pip install openai`):

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.6io.io/v1", api_key="sixio_sk_...")
reply = client.chat.completions.create(
    model="op/openai/gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello!"}],
    max_tokens=100,
)
print(reply.choices[0].message.content)
```

Node.js (`npm install openai`):

```javascript
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.6io.io/v1", apiKey: "sixio_sk_..." });
const reply = await client.chat.completions.create({
  model: "op/openai/gpt-4o-mini",
  messages: [{ role: "user", content: "Hello!" }],
  max_tokens: 100,
});
console.log(reply.choices[0].message.content);
```

The response comes in the OpenAI format. Its `model` is the name you sent, and the `X-Sixio-Request-Id` header holds the request ID, a string like `req_8fK2xQ1mZpVwT9sJdL4nAg`. With the ID you can look up what the request cost.

## What it cost

The balance:

```bash
curl https://api.6io.io/v1/balance -H "Authorization: Bearer sixio_sk_..."
```

```json
{
  "currency": "credits",
  "balance": "9.986728000000",
  "reserved": "0.000000000000",
  "available": "9.986728000000"
}
```

One request by its ID:

```bash
curl https://api.6io.io/v1/requests/req_8fK2xQ1mZpVwT9sJdL4nAg -H "Authorization: Bearer sixio_sk_..."
```

```json
{
  "id": "req_8fK2xQ1mZpVwT9sJdL4nAg",
  "object": "request",
  "model": "op/openai/gpt-4o-mini",
  "status": "succeeded",
  "billing_status": "settled",
  "reserved": "0.500000000000",
  "charged_credits": "0.013272000000",
  "created_at": "2026-10-26T12:00:01Z",
  "finished_at": "2026-10-26T12:00:03Z"
}
```

The console shows the same: the Requests tab is the history with state and amount, Spending is spending by day and model, Models has the prices. The Playground tab sends a real paid request from the browser with your key.

## What next

- [Chat](https://api.6io.io/md/en/chat.md): a request, streaming, prices, free models.
- [OpenRouter models](https://api.6io.io/md/en/openrouter.md) and [Venice models](https://api.6io.io/md/en/venice.md): providers and prices, sorting, plugins, specifics.
- [fal models](https://api.6io.io/md/en/fal.md) and [Sixio models](https://api.6io.io/md/en/sixio.md): images, video and audio as tasks.
- [Background jobs](https://api.6io.io/md/en/jobs.md): a long chat without an open connection.
- [Webhooks](https://api.6io.io/md/en/webhooks.md): learn about the end of a request without polling the status.
- [Balance and prices](https://api.6io.io/md/en/billing.md): how the price is calculated and what a reserve is.
- [Retries and failures](https://api.6io.io/md/en/retries.md): how not to pay twice.
- [Errors and limits](https://api.6io.io/md/en/errors-and-limits.md): the table of codes.

By using the API you accept the [terms of use](https://api.6io.io/md/en/terms.md): the service is provided "as is", and you are responsible for the content of requests and the use of responses.
