API overview

API overview

Base URL

https://api.inference.club/v1

The /v1 namespace mirrors the OpenAI API surface. Anything that speaks OpenAI — the official SDKs, Open WebUI, OpenRouter-style routers — can use this base URL with no other changes.

Prefer an interactive reference? The API explorer renders the full OpenAPI spec with an "Authorize → Try it out" flow. The machine-readable spec is at api.inference.club/openapi.json. Building an agent? Start with the agent quickstart.

Endpoints

Inference

EndpointModality
GET /v1/modelsList models you can reach (with capabilities).
GET /v1/catalogCatalog — every node, service and model you can reach, grouped by type, with readiness.
POST /v1/chat/completionsChat completions — text chat, multimodal input.
POST /v1/completionsLegacy text completions.
POST /v1/audio/transcriptionsSpeech-to-text — audio in, text out.
POST /v1/audio/speechText to speech — text in, audio out.
POST /v1/audio/enhanceAudio enhancement / denoise — audio in, cleaned audio out.
GET /v1/audio/voicesList the TTS voices a model offers.
POST /v1/images/generationsImage generation — text in, image out.
POST /v1/images/editsImage edits — image + prompt in, image out.
POST /v1/music/generationsMusic generation — text + optional lyrics in, audio out.
POST /v1/videos/generationsVideo generation — text (+ optional image) in, video out.
POST /v1/voice/generationsVoice cloning — Dia dialogue synthesis with speaker voice samples.
POST /v1/3d/generations3D mesh generation — text or image in, GLB/mesh out.
EndpointBody
------
GET /v1/models—
POST /v1/chat/completionsJSON
POST /v1/completionsJSON
POST /v1/images/generationsJSON
POST /v1/images/editsmultipart
POST /v1/audio/speechJSON
GET /v1/audio/voices—
POST /v1/voice/generationsJSON
POST /v1/music/generationsJSON
POST /v1/videos/generationsJSON
POST /v1/audio/transcriptionsmultipart
POST /v1/audio/enhancemultipart
POST /v1/3d/generationsmultipart (image + optional options)
POST /v1/scrapeJSON {model, url}

Async jobs, batches, workflows, capacity

EndpointPurpose
GET /v1/capacityLive GPU slot usage per model (see Capacity).
GET /v1/jobsList your async jobs.
GET /v1/jobs/<id>A job's status and result (output_text, media).
POST /v1/jobs/<id>/cancelCancel a queued job.
POST /v1/jobs/<id>/retryRe-queue a failed or canceled job.
POST /v1/batchesSubmit up to 256 requests as one batch.
GET /v1/batchesList your batches.
GET /v1/batches/<id>Batch status and its jobs. POST to the same path cancels it.
GET /v1/workflows/templatesCurated, ready-to-run workflow templates.
POST /v1/workflows/runsStart a workflow run (template or inline spec).
GET /v1/workflows/runsList your workflow runs.
GET /v1/workflows/runs/<id>Live DAG state, steps, and outputs.
POST /v1/workflows/runs/<id>/steps/<step_id>/approveApprove a gate step.
POST /v1/workflows/runs/<id>/steps/<step_id>/rejectReject a gate step.
POST /v1/workflows/runs/<id>/steps/<step_id>/rerunRe-run one step and everything downstream.

See the jobs, batches, and workflows references.

Each model on /v1/models reports service_type (llm, stt, tts, image, music, video, mesh, scrape, audio-enhance), input_modalities, output_modalities, supported_features, and context_length. A request is only routed to a service of the matching type — a transcription never lands on an LLM.

Authentication

All /v1/* requests require a Bearer token:

Authorization: Bearer <your-api-key>

Get a key from Dashboard → Settings → Token. The same key authenticates both inference (/v1/...) and your agent's heartbeats. Requests without a valid token return 401 with DRF's {"detail": "..."} body.

Error format

Errors come back in OpenAI's error envelope:

{
  "error": {
    "message": "No online provider serving model 'qwen3-8b' for this user.",
    "type": "no_provider"
  }
}

Common types:

typeWhenHTTP
invalid_request / missing_prompt / missing_input / missing_fileMalformed or incomplete body400
missing_api_keyA provider:model external model with no key saved for that provider400
no_providerNo online provider you can reach serves that model right now404
request_too_large / file_too_largeInput over a limit413
unsupported_media_typeUploaded file isn't an accepted type415
at_capacityEvery GPU slot serving the model is busy (see Capacity). Has retry_after and a Retry-After header.429
upstream_errorThe provider's model server returned an error or didn't respond502
async_disabledasync / batches / workflows on a deployment without a job queue503

Auth failures and rate-limit 429s come from Django REST Framework and use {"detail": "..."} instead. Tell the two 429s apart by the body: error.type == "at_capacity" means this model's device is busy; a detail body means your account is over its request rate.

Streaming

/v1/chat/completions and /v1/completions honor stream: true. The response is a Server-Sent Events stream of OpenAI-format delta chunks ending with data: [DONE], passed through from the provider's server unbuffered.

Async

Async-capable endpoints (✓ above) accept an async field, stripped before the body reaches a provider:

asyncBehavior
omitted / falseSynchronous.
trueAlways queue as a job; returns 202 Accepted.
"auto"Run now if a GPU slot is free; otherwise queue and return 202. A known model whose provider is momentarily offline is also queued (it waits up to an hour) instead of returning 404.

The 202 body is a job envelope:

{
  "id": "42",
  "object": "inference.job",
  "status": "QUEUED",
  "inference_type": "IMAGE",
  "model": "flux-dev",
  "created": 1718312400,
  "queued_at": "2026-06-13T12:00:00Z",
  "poll_url": "/v1/jobs/42",
  "queued_reason": "requested"
}

queued_reason is requested, at_capacity, or no_provider. Poll poll_url until the status is terminal — see Async jobs. Pass an Idempotency-Key header to deduplicate retried submissions.

Media delivery

Endpoints that return raw media bytes — /audio/speech, /audio/enhance, /music/generations, /videos/generations, /voice/generations — accept delivery:

  • "bytes" (default) — the raw file, as OpenAI does. Headers name the stored copy: X-Inference-Request-Id, X-Asset-Id, X-Asset-Url.
  • "url" — JSON instead of bytes:
{
  "object": "inference.result",
  "id": "8812",
  "public_id": "kQ3v9xZp1aE",
  "inference_type": "TTS",
  "model": "magpie-tts",
  "status": "PROCESSED",
  "created": 1780266332,
  "data": [{ "id": 551, "kind": "audio", "url": "https://…", "content_type": "audio/wav", "duration_seconds": 2.4 }]
}

For JSON bodies send delivery as a field; for multipart (/audio/enhance) send it as a form field. Every output is stored either way, so it shows up in your dashboard and can be shared.

Capacity

Every provider service declares how many requests it can run at once (max_concurrent, default 1), and services sharing a GPU can share one budget through a resource group (see Providers → Capacity). That budget is enforced across every path — sync /v1 calls, async jobs, workflow steps, playground agent tools, and retries — so a device never receives more concurrent requests than its operator declared.

  • Sync media request, device busy: the server waits briefly (about 20 seconds) for a slot. If none frees up it returns 429 at_capacity with Retry-After.
  • async: "auto", device busy: queued immediately (202, queued_reason: "at_capacity"). If jobs for that model are already waiting, an auto request joins the back of the line rather than jumping it.
  • Queued jobs are dispatched as slots free up.
  • LLM chat isn't gated on the sync path — LLM servers batch concurrent requests internally. Async LLM jobs still respect max_concurrent.

GET /v1/capacity shows the live picture for models you can reach:

{
  "object": "list",
  "data": [
    { "model": "ltx-2", "service_type": "video", "provider": "home-rig",
      "in_flight": 1, "max_concurrent": 1, "queued": 3, "resource_group": "gpu0", "available": false }
  ]
}

Limits

LimitDefault
Inference requests per account60 / minute (guest accounts: 15 / minute)
GET /v1/models120 / minute
Chat: messages per request200
Chat/completions: input characters100,000
max_tokensClamped to 8,192
Image / video prompt4,000 characters
Images per generation (n)4
TTS / voice input, music prompt + lyrics5,000 characters
Audio upload (transcriptions, enhance)25 MB
Image upload (edits, 3D)25 MB; up to 10 images per edit
Batch size256 requests
Upstream timeout300 seconds per sync request

Rate-limited responses carry X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers on every call, and Retry-After on a 429. Deployments can override these defaults.