Skip to main content
GPT-5.1 is available through AnyFast via an OpenAI-compatible interface.

Key capabilities

  • OpenAI-compatible — Works as a drop-in replacement with the OpenAI SDK
  • Streaming — Supports real-time token streaming via SSE
  • Tool use — Supports function calling and tool use
  • Flexible output — Supports JSON mode and structured output

Quick example

curl https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.1",
    "messages": [
      { "role": "user", "content": "Explain quantum entanglement in simple terms." }
    ]
  }'

Parameters

ParameterTypeRequiredDescription
modelstringYesMust be gpt-5.1
messagesarrayYesList of { role, content } objects
max_tokensintegerNoMaximum tokens to generate
temperaturefloatNo0\u20132. Controls randomness. Default: 1
streambooleanNoEnable SSE streaming. Default: false
top_pfloatNoNucleus sampling threshold. Default: 1
stopstring / arrayNoSequences that stop generation
toolsarrayNoList of tools the model may call
response_formatobjectNoSpecify output format (e.g. JSON mode)

API Reference

View the interactive API playground for GPT-5.1.