Skip to main content
POST
string
required
The model ID to use. See the Models reference for all available IDs.Popular values: gpt-4o, gpt-4o-mini, claude-3-5-sonnet-20241022, gemini-2.0-flash, deepseek-chat
array
required
Array of conversation messages. Each message has a role (system, user, assistant) and content.
number
default:"1"
Sampling temperature from 0 to 2. Lower = more deterministic, higher = more creative.
integer
Maximum tokens to generate. If omitted, uses the model’s default.
boolean
default:"false"
If true, streams partial tokens via Server-Sent Events. See Streaming.
number
default:"1"
Nucleus sampling. Only sample from top p probability mass. Use temperature OR top_p, not both.
number
default:"0"
Penalizes tokens based on how often they appear in the text so far. Range: -2.0 to 2.0.
number
default:"0"
Penalizes tokens based on whether they have appeared at all so far. Range: -2.0 to 2.0.
string | array
Up to 4 stop sequences. The API will stop generating further tokens when it encounters any of these.
integer
default:"1"
Number of completions to generate. Each counts toward your usage.
string
A unique identifier for your end-user. Helps with abuse monitoring.