Connect to Standard Thinking

Explore Standard One, set up the Standard API, and find access and integration guidance for your plan.

API reference: /v1 · Documentation updated

Send your first API request.

You need an account, an API key, and access to the model used in the example. Follow the installation instructions for your language before running the code.

1. Create an API key

Open the console and create a key in your workspace. Copy the secret when it is shown and store it securely.

Keep your key private

Keep API keys out of browser code and source control. Use a separate key for each service or environment.

Set your API key
export STANDARD_API_KEY="YOUR_STANDARD_API_KEY"

2. Configure your client

Set the Standard Thinking base URL and load your API key from a server-side environment variable.

Base URL
https://api.standardthinking.ai/v1

3. Check model access

Use GET /v1/models to find the model IDs available to your API key. The list may include models with is_ready: false. Check is_ready, supported features, and limits before choosing a model; readiness is a snapshot and does not reserve capacity or guarantee a successful request. Compare rates and context windows in the model catalog.

GET200 · JSON
/v1/models
curl
curl https://api.standardthinking.ai/v1/models \
  -H "Authorization: Bearer $STANDARD_API_KEY"

4. Send and read a response

Choose an example below and use a model enabled for your workspace. The JavaScript and Python examples display the streamed text; curl displays the raw streaming events. These examples use qwen/qwen3.6-35b-a3b and limit output to 64 tokens. Confirm that the full model ID appears in your model list and is ready, or replace it with another ready chat model available to your key.

The Qwen-specific setting chat_template_kwargs.enable_thinking: false disables thinking for this short example. Check supported settings when changing models. max_tokens limits the output budget, which reasoning can consume before visible text appears; if finish_reason is length, increase the budget as needed.

Install dependencies

JavaScript: use Node.js 22 or later, run npm install openai, save the example as request.mjs, then run node request.mjs. Python: run python3 -m pip install openai, save as request.py, then run python3 request.py. Set the API key in the same terminal first.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.STANDARD_API_KEY,
  baseURL: "https://api.standardthinking.ai/v1",
});

const response = await client.chat.completions.create({
  model: "qwen/qwen3.6-35b-a3b",
  messages: [
    { role: "user", content: "Say hello in one short sentence." },
  ],
  max_tokens: 64,
  chat_template_kwargs: { enable_thinking: false },
  stream: true,
});

for await (const chunk of response) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}

API reference

Check supported requests, response fields, and error handling. Model access, feature support, and limits can vary by workspace and model.

Authentication

Authenticate every request with a workspace API key in the Authorization header.

HeaderRequired
Authorization: Bearer $STANDARD_API_KEY
Key scope

Keys belong to a workspace within an organization and can be individually revoked. Applicable key, workspace, and organization request limits are enforced together; inference spends the organization’s shared credit balance. Use a separate key for each production service.

Chat completions

POSTJSON
/v1/chat/completions

Send a conversation to a supported model. Check its supported inputs and parameters before making a request. Set stream to true for incremental server-sent events.

Request parameters

Parameter Type Description
model string · required The model ID to use for generation.
messages array · required Conversation messages in system, user and assistant roles.
stream boolean Returns incremental SSE events when true.
max_tokens integer Maximum number of output tokens to generate.
chat_template_kwargs object · model-specific Template settings supported by the selected model. For the Qwen model in the quickstart, enable_thinking: false disables thinking. Other models may support different settings.
temperature number Sampling temperature between 0 and 2.
tools array Functions the model may call during generation.

Response

Field Type Description
id string Unique identifier for the completion.
choices[] array Generated messages or tool calls, with a finish reason for each choice.
usage.prompt_tokens integer Input tokens metered for the request.
usage.completion_tokens integer Output tokens metered for the response.

Cached-input billing and the usage fields that report it differ by provider.

Streaming

Streaming responses use server-sent events. Events can contain text or tool-call deltas, a finish reason, usage, or an error. A usage-only event can have an empty choices array. Read the whole stream and check errors; receiving HTTP 200 or the final [DONE] marker alone does not mean generation completed successfully. The following abbreviated example shows text and usage events.

data: {"choices":[{"delta":{"content":"Standard Thinking"}}]}

data: {"choices":[{"delta":{"content":" is ready."}}]}

data: {"choices":[],"usage":{"prompt_tokens":16,"completion_tokens":6,"total_tokens":22}}

data: [DONE]

Credit rejected before streaming starts returns HTTP 402 with insufficient_credit. If credit runs out after the stream has started, the response remains HTTP 200 and ends with an error event whose type is billing_error and code is insufficient_credit, followed by [DONE]. A billing authorization outage during the stream can instead emit canonical_billing_unavailable. Handle these events as failed or partial responses.

Models

GETJSON
/v1/models

List models available to your API key, including models whose is_ready value is false. Use each entry’s id in requests. Check context_length, max_output_length, supported_features, and any endpoints before selecting one. Readiness reflects current capacity and can change before your request. For rates and context windows, see the model catalog and API rates.

Rate limits

Check the request and token limits that apply to your workspace and model in the console. Temporary request rate limits, model token admission limits, and capacity shortages return HTTP 429 with a Retry-After header. Request rate headers are included when the gateway has a valid request rate bucket snapshot, including successful inference responses. Authentication failures, early validation failures, and requests refused during a rate-policy change may omit them.

Header Type Description
x-ratelimit-limit-requests header Requests replenished per second for the reported request rate bucket. This is also its maximum burst size.
x-ratelimit-remaining-requests header Whole requests immediately available in that bucket, measured after this request's admission check.
x-ratelimit-reset-requests header Estimated time until that bucket is full, expressed in milliseconds, for example 200ms. Request capacity replenishes continuously.
Retry-After header Seconds to wait before retrying. For example, Retry-After: 1 means wait at least one second. A retry can still be refused if the limit or capacity shortage persists.

When multiple key, workspace, or organization request rate buckets apply, the three request rate headers describe the bucket with the fewest whole requests available; ties select the bucket with the longest time until full. Values are a snapshot, not a reservation for a future request. They describe the responding gateway’s local admission bucket, not a globally synchronized counter.

For temporary limits, wait for Retry-After before retrying. Use bounded retries with backoff and jitter if requests keep failing. HTTP 400 with request_exceeds_token_burst means a single request is too large for the model token burst limit; reduce the input or requested output tokens before sending it again.

Before a response stream starts, insufficient credit returns HTTP 402 with error.type: billing_error and error.code: insufficient_credit on the OpenAI-compatible API. Anthropic Messages uses billing_error for the same condition. Monthly token quotas and workspace spend caps return HTTP 403 with monthly_token_limit_exceeded or workspace_spend_cap_reached. Credit exhaustion and these monthly limits do not include Retry-After: stop automatic retries and top up, change the applicable limit, or wait for its renewal. Credit balances and monthly quotas are separate from request rate headers. See streaming error handling for failures after HTTP 200 has already been sent.

Error codes

Use the HTTP status and error details to investigate a failed request. The table lists common error.code values on the OpenAI-compatible API, with a general category for unexpected server failures. Other validation and upstream errors can use different codes; inspect the response body. Include the request ID when one is available.

Code Key Description
400 missing_model / invalid_json / invalid_stream The model field is missing, the body is not valid JSON, or stream is not a boolean. Correct the field identified by the error before retrying.
401 invalid_api_key The API key is missing, invalid or revoked.
404 model_not_found The requested model was not found. Check the full model ID against GET /v1/models.
400 request_exceeds_token_burst The request exceeds the model token burst size. Reduce the input or requested output tokens; retrying the same request will not help.
402 insufficient_credit The available credit cannot cover this request. OpenAI-compatible responses use billing_error, distinct from a temporary rate_limit_error. Stop automatic retries and top up the organization’s credit balance.
503 canonical_billing_unavailable Billing authorization is temporarily unavailable. Wait for Retry-After before retrying.
429 rate_limit_exceeded A temporary request rate or model token admission limit was reached, or the admission queue could not accept the request. Wait for Retry-After before retrying.
429 gpu_capacity_exhausted / gpu_capacity_temporarily_unavailable / engine_overloaded Serving capacity is temporarily unavailable. Wait for Retry-After before retrying.
403 monthly_token_limit_exceeded The account seat's monthly token quota cannot cover this request. Stop automatic retries; change the applicable limit or wait for renewal.
403 workspace_spend_cap_reached The workspace reached its monthly spend cap. Wait for the next month or raise the cap in the console. This error does not include Retry-After.
500 Unexpected server failure (code varies) An unexpected error occurred. Inspect the response body rather than expecting one fixed error code. Retry after a delay; if it persists, contact support with the error details and any request ID.

Other products

Coding Plan capacity and billing are below. For a Product Plan, plan an integration or request access and ask what applies to your product.

Coding Plan: capacity, billing, and setup

The current lineup is Kimi K3, GLM-5.3, and DeepSeek V4.1 Flash; model selection may change under the terms. Compare the plans on the pricing page or read the Coding Plan terms for the conditions that apply.

PlanPriceMonthly token allowanceUsageAccess
Weekly$149 per weekNo fixed allowanceNo fixed limit; may be slower at peak hoursOn request; configuration confirmed in your terms
Monthly$549 per 30-day periodNo fixed allowanceNo fixed limit; may be slower at peak hoursOn request; configuration confirmed in your terms

Requests may be slower at peak hours; queue behavior is subject to available capacity and the terms provided with your access. See the Coding Plan page and terms.

Billing periods, renewal, and plan changes are described in the applicable terms. Read how billing works. To request access, create an account.

Tool setup and verification.

Tools that speak OpenAI chat completions, OpenCode among them, connect with the base URL above. To make our models Codex’s main model, run a Responses proxy that accepts POST /v1/responses, forwards chat completions with streaming and tool calls intact, and returns usage. Codex speaks only the Responses API, so point a model_providers entry in ~/.codex/config.toml at the proxy with wire_api = "responses". Claude Code setup instructions are not yet published; ask for them when you request access.

Ask about tool support and setup or compare Coding Plan pricing. To compare this with other plans, read capacity and plan terms, a glossary of the units, windows, and limits they use.

If the first request fails

  • Key not accepted: check that the key is valid and loaded in the environment where the request runs.
  • Model unavailable: check the model ID and your workspace’s access to that model.
  • Request limit reached: follow the documented retry timing for the applicable request or token limit.

For help, contact technical support with the request ID and error details. Do not include your API key.

Review streaming and error handling, compare models, and check API rates before connecting your application.