POST /v1/responses

Changed on

Create a response with the OpenAI-compatible Responses API. Compatible models can use the Responses-only hosted tool-search pilot by adding a nanogpt:tool_search or tool_search entry and marking function tools with defer_loading: true. The NanoGPT Advisor extension is available for non-streaming, foreground, platform-billed pay-as-you-go API-key requests that do not use client tools, structured output, inline moderation, BYOK, accountless payment, memory, or server-side content enhancements.

Request

  • Base URL
    https://nano-gpt.com/api
  • URL
    https://nano-gpt.com/api/v1/responses
  • Auth
    • HTTP bearer
    • or API key in header x-api-key
    • or none

Headers

X-Providerstring

Optional explicit provider override for supported open-source models (case-insensitive). Explicit provider selection is billed pay-as-you-go at the selected provider's price, including provider-selection markup; for subscription users it bypasses subscription coverage for that request.

X-Billing-Modestring

Optional billing override to force pay-as-you-go without an explicit provider, or to apply saved provider preferences to subscription-included traffic (e.g., paygo). Header name is case-insensitive.

X-Team-Idstring

Optional team context override for API-key requests. If provided, it must reference a team the caller belongs to.

x-x402'true'

Set to true on unauthenticated accountless x402 quote requests. Without this header, unauthenticated requests return 401 missing_api_key.

Request body

modelstring required

Model ID to use for the response. Provider-selection-capable models may include routing preference suffixes such as ':fast', ':speed', ':cheap', ':price', ':latency', ':throughput', ':floor', ':tools', ':caching', ':cache', or ':cached'. Model ID or compatibility alias. Append :reasoning-effort/<effort>, where effort is none, low, medium, high, xhigh, or max, to supply a default reasoning.effort. The suffix is stripped before model routing and is not listed as a separate model. Explicit reasoning generation settings take precedence, including enabled thinking when the suffix is none. The none suffix requests disabled reasoning where supported; it does not bypass model/provider restrictions. Other effort levels remain model/provider-specific.

billing_modestring

Billing override to force pay-as-you-go without an explicit provider, or to apply saved provider preferences to subscription-included traffic. Accepted values (case-insensitive): paygo, pay-as-you-go, pay_as_you_go, paid, payg.

billingModestring

Alias for billing_mode.

instructionsstring

System instructions for the model

max_output_tokensinteger

Maximum tokens in the response

temperaturenumber

Sampling temperature (not supported by reasoning models)

top_pnumber

Nucleus sampling parameter

parallel_tool_callsboolean

Allow multiple tool calls in parallel

streamboolean

Enable streaming responses

storeboolean

Store the response locally for later retrieval/threading/background processing. Set false to disable stored Responses API data for the request.

retention_daysinteger nullable

Per-request retention override in days (0..365). Use 0 to disable retention for the request; use null to fall back to configured defaults.

retentionDaysinteger nullable

Alias for retention_days (0..365). If both are provided, values must match.

previous_response_idstring

Link to previous response for conversation threading

reasoningobject

Reasoning configuration. Setting reasoning.effort to any non-none value explicitly requests reasoning mode.

textobject

Text/format configuration

metadataobject

Custom metadata

truncation'auto' | 'disabled'

Truncation strategy

userstring

Unique user identifier

seedinteger

Optional integer forwarded on model/provider routes that support seeded sampling. This may improve reproducibility but does not guarantee identical output. Results can change if NanoGPT selects a different automatic or fallback route, or if the provider changes its backend.

backgroundboolean

Enable background/async processing

service_tier'auto' | 'default' | 'flex' | 'fast' | 'priority'

Optional processing tier. Use flex for lower-cost variable-capacity processing or fast for higher-priority processing where supported. priority remains accepted as a legacy alias for Fast on OpenAI models. Discover model support with GET /api/v1/models?detailed=true and inspect supported_service_tiers; the basic model list intentionally omits this field.

Response

Response created

idstring
objectstring
created_atinteger
modelstring
status'queued' | 'in_progress' | 'completed' | 'incomplete' | 'failed' | 'cancelled'
outputobject[]
output_textstring
usageobject
errorobject
incomplete_detailsobject
metadataobject
service_tierstring

Changes

    • breaking

      the // request property type changed from object to no type

    • breaking

      the / request property type changed from object to no type

    • info

      added subschema #3 to the / request property anyOf list

    • info

      added subschema #1 subschema #2 to the // request property anyOf list

    • info

      added the new fast enum value to the request property