CONNECT YOUR CLIENT
Your first request.
Create an account, verify your email, then issue an API key. Store it in INFERAFT_API_KEY. The examples below use the current service endpoint.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"inferaft": {
"npm": "@ai-sdk/openai-compatible",
"name": "Inferaft",
"options": {
"baseURL": "https://inferaft.com/v1",
"apiKey": "{env:INFERAFT_API_KEY}"
},
"models": {
"YOUR_MODEL_ID": {
"name": "YOUR_MODEL_ID",
"limit": {
"context": 262144,
"output": 32768
}
}
}
}
}
}For OpenCode, save the configuration as opencode.json in your project, set INFERAFT_API_KEY in your shell, then select your Inferaft model with /models.
For Claude Code, the Anthropic base URL has no /v1 suffix. Select the Qwen model explicitly. Tool availability and reasoning behavior differ from Claude.
Client compatibility
Inferaft connects clients to open models. These logos identify independent tools, not a partnership or a subscription to their models.
Messages and token counting. Text, streaming and function-tool roundtrips tested.
Official guideUse the OpenAI-compatible provider configuration above. Client features depend on the selected model.
Official guidePreview configuration for stateless Responses. Hosted tools, stored conversations and media are unavailable. Full agent compatibility is not yet certified.
Official guideChoose OpenAI Compatible, enter your endpoint and key, then set the model context and output limits.
Official guideCustom endpoint availability depends on your Cursor version. API keys do not replace a Cursor subscription or unlock every feature. Inferaft integration is not yet validated.
Official guidePlan allowances
Lite, Plus and Pro last 30 days from confirmed payment. Input, cached input and output tokens are valued using the rates saved when your plan starts. Usage counts toward the last 5 hours, last 7 days and entire 30-day period simultaneously.
All plan keys share these allowances. The 5-hour and 7-day windows roll continuously. Unused period allowance expires with the plan.
Before generation, enough allowance is reserved for the model context ceiling and requested output limit. Final measured usage replaces that reservation. If any window lacks allowance, the request pauses with a plan_usage_limit error. There is no automatic charge to prepaid credit.
Launch is a separate, temporary event pass. It retains its stated end date and has no total token allowance. During the preview, plans are manually renewed after expiry; contact support to arrange an earlier change.
Compare plans · Estimate model usagePrepaid billing
Add USDT credit and create a prepaid API key. Requests use your balance at the published token rates. We reserve enough credit before a request, then charge measured usage and release the remainder. Credit does not expire and there is no automatic top-up.
Billing source is fixed when a key is created. Plan keys never spend your credit. Prepaid keys charge your balance, even when a pass is active.
Optional key budgets use the last 5 hours and 7 days, including outstanding reservations. These are spending caps you choose, not included subscription credit. A new key does not reset your workspace balance or shared capacity limits.
If final usage is missing, the request is marked for review and its reservation remains held. Further prepaid requests pause until reconciliation. Requests rejected before generation release their reservation. Contact support with the request ID; retries are separate requests.
Input includes cache reads and writes. Output includes reasoning; it is not charged twice. A dash means the model did not report that measurement. Output caching is not supported.
Charges round up once per request to the nearest $0.000001. Cache writes use the input rate. Unreported cache hits receive no cache discount. You can inspect the saved rate and export recent requests from Usage.
Add credit · Create a prepaid key · Inspect usageSupported API surface
| Endpoint | Supported behavior |
|---|---|
GET /v1/models | Discover the model and context limits. |
POST /v1/chat/completions | Text, function tools, JSON output, SSE, usage. |
POST /v1/messages | Native Anthropic text/function tools and SSE. |
POST /v1/messages/count_tokens | Token count for a formatted Messages request. |
POST /v1/responses | Stateless text and caller-executed function tools. Send store: false. |
Stored Responses, previous_response_id, background jobs, hosted tools, files, media URLs and image inputs are not supported in this preview. Streaming tool calls are returned to your client; Inferaft never executes the tools.
Plan for shared capacity
One in-flight request per workspace, including queued requests. All keys share the same limit. Up to 30 starts per rolling minute. Longer prompts use the same plan allowances, with no separate hourly request quota.
Context is checked with the model’s tokenizer before generation. Input plus maximum output must fit 262,144 tokens. Output is capped at 32,768 tokens. A request can queue for up to 45 seconds and has a 15-minute overall deadline.
429 Too Many Requests
Retry-After: 5
x-request-id: …
Wait at least Retry-After seconds.
Then retry with exponential backoff + random jitter.Do not open extra API keys to bypass limits. When a client disconnects, its upstream request is canceled. Retry interrupted generations deliberately: a retry is a new generation.
Reasoning and function tools
Reasoning is off by default to keep short requests predictable. With OpenAI clients, pass extra_body={"chat_template_kwargs":{"enable_thinking":true}}. With Anthropic clients, use the thinking option. Reasoning consumes the output allowance. For this Qwen model, high maps to medium and max maps to xhigh. Native Messages does not enforce a separate budget_tokens; use adaptive/on-off thinking and max_tokens.
Provide ordinary function schemas, inspect returned tool calls, execute authorized actions in your own client, and return tool results. API compatibility does not guarantee that every agent workflow succeeds; evaluate your actual tasks.
Inspect metadata, keep content local
The console records status, model, timestamps, token counts, queue time and duration. Inferaft’s application database does not store prompt or completion bodies. Your client and the model host may have their own retention settings.
Incomplete streams can lack final token usage. These are marked incomplete rather than zero. x-request-id identifies a request when investigating a failure.