NewDeepSeek V4.1 Flash and MiniMax M3.1 Flash are live
Inferway
Skip to content
Developer docs

Call the API in one minute.

Start with one copyable request, then follow the path that matches your job.

Start by intent

Choose the job you need to finish right now.

Happy path

From empty shell to verified request.

Client guides

Tool Integration

Endpoint reference

Inferway keeps the OpenAI-compatible path small and predictable, then exposes account, billing, usage, and agent operations as separate first-party endpoints.

OpenAI-compatible API/v1/chat/completions

Use this for chat, tools, structured output, and streaming with OpenAI SDKs.

Interactions API/v1/interactions

Use this for video generation: durable background jobs you submit once and poll until the result is ready.

Console API/v1/keys · /v1/billing · /v1/usage · /v1/requests

Use this for server-side key, wallet, usage, and request-metadata workflows.

EndpointMethodPurpose
/v1/chat/completionsPOSTOpenAI-compatible chat completions
/v1/interactionsPOSTAsynchronous video generation jobs (five operations on one route)
/v1/modelsGETList published models with capability and pricing metadata
/v1/mcp/sse · /v1/mcp/messagesGET · POSTMCP server endpoint (live)
/v1/keysGET / POST / DELETEManage direct API keys
/v1/billingGETWallet summary and recent usage
/v1/billing/transactionsGETWallet ledger transactions
/v1/billing/checkoutPOSTCreate a Stripe Checkout top-up session
/v1/usageGETAggregated usage for a time window
/v1/requestsGETRequest metadata history (no content)
/healthGETGateway and backend health status
/v1/statsGETAggregate service statistics

Interactions: one route, five operations

Video generation does not return inline. Every call goes to POST /v1/interactions and names the operation in the body's op field; the job is durable, so a dropped connection never loses work already paid for.

opPurpose
prepare_uploadRequest a one-time upload ticket for a single input image — JPEG, PNG or WebP, at most 10 MiB each.
createSubmit a generation task and get an interaction id. The price of the ordered duration is held when you submit and charged only once the video is ready; a failed task costs nothing.
getRead the durable state, the current stage, and — once delivery commits — the result and its download URL.
cancelBest-effort cancellation of a queued or in-flight job.
listList past interaction jobs with pagination and status filtering.
  • mode must be "background". Synchronous and streaming modes are rejected with 422; there is no inline variant of this route.
  • Idempotency-Key is required on create. The same key with the same request returns the original receipt without charging again; the same key with a different request fails closed with 409.
  • model, mode, duration_seconds and prompt are all top-level fields of the request body. duration_seconds is required and accepts only the published whole-second tiers — it is what the job is billed on.
  • Poll with the get operation until the state is terminal. Our own console polls every 2 seconds; there is no webhook and no long-poll.

Supported public endpoints are POST /v1/chat/completions, POST /v1/interactions and GET /v1/models. The legacy POST /v1/completions is not served: it answers 501 (not implemented) and names the chat completions route to use instead. POST /v1/messages (Anthropic-format) is served and open to API keys; every request must carry the anthropic-version: 2023-06-01 header.

Models

10

Choose a model to see its published capability facts. API examples and tool setup use the same selection.

No model is currently selected.

Authentication

  • API keys. Every key is prefixed inferway_live_… and is issued for server-side workloads.
  • Key expiry. When you create a key in the Console, you can give it a fixed expiry date or have it expire a set time after its first call. The first request that uses the key for real work starts the countdown; listing models or checking on a video job does not. Once started, it never pauses or resets. Rotating a key before its countdown starts gives the new key the same countdown. An expired key gets 401, the same as an invalid one.
  • Browser apps. Do not expose direct keys client-side; proxy requests through your backend.

Error codes

Inferway returns OpenAI-compatible error objects: {"error": { "type": "...", "message": "...", "code": "..." }}

Live error catalog

The complete set of error codes /v1/chat/completions and /v1/agent/chat can return, read from the gateway's own catalog rather than transcribed. Each row carries the HTTP status, whether a retry is safe, and the exact message the API sends. Checkout, billing and key-management endpoints return their own codes, not listed here.

CodeHTTPRetry safeMeaning
account_benefits_restricted403NoFree text use is temporarily restricted. Contact support for a review at https://inferway.ai/console/contact. This restriction does not deduct paid funds.
admission_paused503Yes — back off firstPaid admission is paused while we finish a service change. Retry shortly; nothing is wrong with this request.
authentication_error401NoAuthentication failed.
conflict409NoA conflict occurred with the current state of the resource.
context_length_exceeded400NoThe prompt exceeds the model's context window. Shorten or compact the conversation and retry.
free_quota_exhausted429Yes — back off firstFree quota exhausted. Please retry later.
free_tier_unavailable503Yes — back off firstThe free tier is temporarily unavailable; please retry shortly.
internal_error500NoAn internal error occurred.
internal_tool_failure500NoAn internal tool error occurred.
invalid_image_input400NoThe image input was invalid. Check the image rejection code and message.
invalid_request400NoThe request was invalid.
malformed_upstream502NoReceived an invalid response from the upstream service.
model_unavailable503Yes — back off firstThis model is temporarily out of service. Other models are unaffected; please retry later.
payment_required402NoPayment required. Add credit at https://inferway.ai/console/billing
playground_allowance_exhausted402NoYour daily Playground allowance is used up. Top up at https://inferway.ai/console/billing to continue, or try again after 00:00 UTC.
promotional_credit_not_supported402NoThis model accepts purchased funds, top-up bonuses and earned rewards (referral, feedback); other promotional credits cannot be used here. Please add funds.
rate_limited429Yes — back off firstRate limit exceeded. Please retry later.
service_unavailable503NoService outage in progress. Live status: https://inferway.ai/status
upstream_rejected422NoThe upstream service rejected the request.
upstream_timeout504Yes — back off firstThe upstream service timed out. Please retry.
upstream_unavailable503Yes — back off firstThe service is temporarily unavailable.
Codes, statuses and retry policy read from GET /v1/public/errors

Platform rate limits and quotas

These are platform request windows and account quotas, not generation-capability or retention claims for an unselected model.

SubjectLimitWindow
Anonymous playground90per minute, per IP
Anonymous playground500per hour
Anonymous playground1,000per rolling 24 hours
Funded accountsAccount limitsFree caps no longer apply — visible in the console

Next steps