POST /v1/chat/completions
Changed onCreates a chat completion for the provided messages. The NanoGPT Advisor extension is available for non-streaming, 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 URLhttps://nano-gpt.com/api
- URLhttps://nano-gpt.com/api/v1/chat/completions
- Auth
- HTTP bearer
- or none
Headers
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.
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.
Set to true on unauthenticated accountless x402 quote requests. Without this header, unauthenticated requests return 401 missing_api_key.
Request body
Example request
{
"model": "minimax/minimax-m2.7",
"prompt_caching": {
"ttl": "5m"
}
}Response
Chat completion response
Changes
- breaking
added
subschema #1to the/request propertyallOflist - breaking
the
request property's min was increased to0.00 - info
added the new optional request property
- info
added the new optional request property
// - info
added the new optional request property
- info
added the new optional request property
- info
the request property
//became optional - info
the
request property default value1was added - info
added the new
developerenum value to the request property// - info
added the new
fastenum value to the request property - info
request property
//list-of-types was widened by adding typesnullto media typeapplication/json
- breaking