# StreamKit API — AGENTS.md

Read the catalog, get quotes and manage orders from your applications. The same services, prices and balance as your dashboard.

- Base URL: `https://streamkit.su/api/v1`
- API: https://streamkit.su/en/docs/api
- OpenAPI: https://streamkit.su/api/v1/openapi.json
- API key: https://streamkit.su/dashboard/settings#api-key

## Authentication

Open https://streamkit.su/dashboard/settings#api-key. In the “API key” section, click “Create key” and save it.

The full key is shown once. Rotating it immediately invalidates the previous key. Send it in the `Authorization: Bearer` header, never in the URL.

Keep `STREAMKIT_API_KEY` on the server only. Never put it in URLs, logs or browser code. The key can spend its owner’s balance; protect the server handler with your application’s authorization.

```http
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## API methods

| HTTP | URL | Description |
| --- | --- | --- |
| GET | `/account` | Account balance and currency |
| GET | `/services` | All service types |
| GET | `/services/{service_id}` | One service and its parameters |
| POST | `/quotes` | Free price quote |
| POST | `/orders` | Purchase a quote |
| GET | `/orders` | All your orders, including website purchases |
| GET | `/orders/{order_id}` | Current order state |
| POST | `/orders/{order_id}/actions` | Start and control an order |

IDs, prices and responses in examples are illustrative. Substitute values from your catalog, quote and order.

## Purchasing services

Get a `service_id` from the catalog and request a quote. Purchase with the `quote_id` and a unique `Idempotency-Key`, then read the status using `order_id`. Quotes are free and valid for 5 minutes.

`GET /services` → `POST /quotes` → `POST /orders` → `GET /orders/{order_id}`

Complete purchase example. Persist `quote_id` and `Idempotency-Key` before checkout and reuse both values after a timeout.

```json
{"service_id":"plan:12","parameters":{"target":"your_channel","duration":"8h"}}
```

## Retrying requests

After a network error, retry the same `quote_id` and `Idempotency-Key`. You receive the same order and current status without another debit. Reusing the key for a different quote returns `409`. Each quote can be purchased once.

```http
Idempotency-Key: my-order-0001
```

201: `created: true` / 200: `created: false`
`Idempotency-Replayed: true`

Plans and configurators create stopped subscriptions and use a separate `start` action. YouTube viewers v2 launch after purchase. States `pending`, `submitting` and `unknown` do not mean rejection: check the same order instead of creating another.

## Services

Products, plans, configurators, YouTube viewers v2 and AI chatbots share quote and purchase methods. Use `family` to select a service type. Get actual `service_id` values and constraints from `GET /services`. Services with `available: false` are temporarily unavailable.

The `pagination` object contains `page`, `limit`, `total` and `pages`. Additional catalog filters are `platform` and `kind`. Values `service_id` and `order_id` refer to different objects: retain the full identifiers from responses.

### Products

`GET /services?family=product`

Followers, likes, views and other products across platforms. Set the order volume in `quantity` and respect `minimum`, `maximum` and `step` from `parameters.quantity`. A purchase returns a `product:<id>` order.

| Parameter | Description |
| --- | --- |
| `target` | A login or URL for the selected platform’s channel, profile, post or video. |
| `quantity` | An integer unit count respecting the service step. |

### Plans

`GET /services?family=plan`

Fixed viewer packages for Twitch, Kick, YouTube and VK Live. The plan defines the `viewers` count. Choose a target and `duration`. A `subscription:<id>` is created stopped; start, pause and other controls are available through the API and dashboard.

| Parameter | Description |
| --- | --- |
| `target` | The selected platform's channel; for YouTube use a channel URL or @handle. A broadcast URL is resolved to its owner's channel. |
| `duration` | Plan duration: `8h`, `7d` or `30d`. |

### Configurator

`GET /services?family=configurator`

Choose the viewer count and duration for Twitch, Kick, YouTube and VK Live. Pricing depends on the parameters. Like a plan, this creates a `subscription:<id>` with dashboard controls and requires `start` after purchase.

| Parameter | Description |
| --- | --- |
| `target` | The selected platform's channel. For YouTube use youtube.com/@handle or youtube.com/channel/UC…. |
| `viewers` | Integer viewer count between `parameters.viewers.minimum` and `maximum`. |
| `duration_hours` | Duration in hours: 1–8760. |
| `duration` | An alternative to `duration_hours`: `1h`, `1d`, `7d` or `30d`. |

### YouTube viewers v2

`GET /services?family=youtube_v2`

Viewers for YouTube live streams, launched automatically after purchase. Orders return as `product:<id>`. There are no subscription panel controls, pauses, channel changes or viewer adjustments.

| Parameter | Description |
| --- | --- |
| `target` | YouTube live stream URL. |
| `quantity` | Viewer count. Limits are in `parameters.quantity`. |
| `duration_minutes` | A catalog field, not an input. Viewer duration belongs to the selected service, for example 60 minutes. Choose a different `service_id` for another duration. Larger viewer volumes are available; the exact limit is `parameters.quantity.maximum`. |

### AI Chatbots

`GET /services?family=ai_chatbots`

AI chatbots for Twitch, Kick, VK Live and YouTube. Send `bots`, `hours` and `variant` for Twitch, Kick and VK Live; use `messages`, `speed` and `language` for YouTube. Select values from `offers`. All purchases return `chatbot:<id>`.

#### Twitch / Kick / VK Live



| Parameter | Description |
| --- | --- |
| `target` | Live stream channel. |
| `bots` | Bot count from an available entry in `offers`. |
| `hours` | An available duration in hours. |
| `variant` | An `audio` or `audio_video` variant from `offers`. |

#### YouTube

YouTube is priced by `messages`, rather than bot count or hours. Use `speed_min` and `speed_max` from `offers` to choose a speed, such as `2-5`.

| Parameter | Description |
| --- | --- |
| `target` | YouTube live stream or premiere URL. |
| `messages` | Integer message count within the offer limits. |
| `speed` | A speed from `offers`, for example `2-5` messages per minute. |
| `language` | Automatic language detection: `auto`. |

## Order controls

The `actions` array lists supported operations. Subscriptions support `start`, `pause`, `stop`, `viewers` and `channel`. The `viewers` count must be 1–`purchased_viewers`. Channel changes depend on quota and cooldown. AI orders can use `start` when their state is `ready`.

## Prices and fulfillment

Select the API currency in account settings: `RUB`, `USD` or `EUR`. The balance, catalog and new quotes use this `currency`. A quote locks its currency and `exchange_rate` for 5 minutes; changing preferences or rates does not alter an existing `quote_id` or the original price of a purchased order.

Amounts are strings with up to 8 decimal places; `unit_price` uses up to 18 to retain small amounts. The `exchange_rate` is RUB per unit of account currency; `rate_date` is the rate date. Internal debit amounts use `price_rub`; the base balance is `balance_rub`. Examples below use `RUB`.

## Limits and errors

600 `GET` and 120 `POST` requests per minute per key. The `limit` parameter is 1–100, default 25. JSON bodies: up to 32 KiB. A `429` response includes `Retry-After` with the waiting time in seconds.

Errors return `error.code` and `error.message`. Check the code, not the message text. After an action fails, check the same order’s state. `Idempotency-Key` applies to purchases, not every POST request.

