API endpoints
Every operation the API exposes, generated from the same OpenAPI document
that powers the interactive reference. The base URL is
https://api.api-stock.com, and every call is authenticated with a bearer
API key — see Authentication.
Account Management
| Method | Path | What it does |
|---|---|---|
GET | /api/v1/stats | Usage and spend statistics for the current user |
GET | /api/v1/user/me | Request to get current user |
Catalog
| Method | Path | What it does |
|---|---|---|
GET | /api/v1/catalog | Get the public model catalog |
GET | /api/v1/catalog/{id} | Get one catalog entry by model id |
Costs
| Method | Path | What it does |
|---|---|---|
GET | /api/v1/cost | Get all prices by model |
GET | /api/v1/cost/{model} | Get prices for specific model |
Generations
| Method | Path | What it does |
|---|---|---|
POST | /api/v1/generation/create | Create generation request based on model. Returns immediately with a taskId |
POST | /api/v1/generation/estimate | Estimate the exact balance charge for a generation request |
LLM
| Method | Path | What it does |
|---|---|---|
POST | /api/v1/chat/completions | OpenAI-compatible chat completion. Set stream: true for server-sent events. |
POST | /api/v1/messages | Anthropic Messages API-compatible endpoint (Claude models). Set stream: true for server-sent events. |
GET | /api/v1/models | List available chat models with token pricing (USD per 1M tokens) |
Task Management
| Method | Path | What it does |
|---|---|---|
GET | /api/v1/task/status/{taskId} | Get task status |
The full document is served at /openapi.json if you
would rather generate a client from it.