API Reference
API reference
Nine endpoints across four capability families, in the familiar OpenAI envelope. Everything is served from the account base URL: https://console.aimodelhub.ai/v1.
Endpoints at a glance
Text
| Endpoint | Purpose | Billing |
|---|---|---|
POST /chat/completions | Generate a model response for a conversation. | Per token |
Discovery
| Endpoint | Purpose |
|---|---|
GET /models | List the models the key can call, with pricing. |
GET /key | Read the calling key's usage and remaining budget. |
GET /brands | List the company profiles for brand-aware completions. |
Media · synchronous
| Endpoint | Purpose | Billing |
|---|---|---|
POST /images/generations | Generate an image. It usually returns inline, as described in the note below. | Per image |
POST /audio/speech | Generate spoken audio from text. | Per token |
Image generation usually finishes inline: if it completes within 50 seconds it returns 200 with the result directly. Past that deadline it returns 202 with a job id instead. Poll GET /images/{id} for the result, the same shape as a video job. A client that only expects 200 will break on a slow generation; handle both.
Media · asynchronous
| Endpoint | Purpose | Billing |
|---|---|---|
POST /videos → GET /videos/{id} | Submit a video job, then poll it. It is never synchronous, and uses a custom job pair because no OpenAI standard exists. | Per second |
GET /images/{id} | Poll an image job that returned 202 instead of finishing inline. | None (poll only) |
A client that reads POST /videos as synchronous will hang waiting for the finished clip, which arrives only from the poll endpoint.
Authenticate every request with the Hub key as a bearer token. See Authentication.