Skip to main content

Request

Response


Vision (Image to Text)

You can also pass images to the model for image-to-text generation.

Request

Response


Parameters

model
string
required
The model that will complete your prompt.
messages
array
required
Input messages.
max_tokens
integer
required
The maximum number of tokens to generate before stopping.
system
string
System prompt.
temperature
number
Amount of randomness injected into the response.
top_p
number
Use nucleus sampling.
top_k
integer
Only sample from the top K options for each subsequent token.
stop_sequences
array
Custom text sequences that will cause the model to stop generating.
stream
boolean
Whether to incrementally stream the response using server-sent events.
metadata
object
An object describing metadata about the request.
tools
array
How the model should use the provided tools.
tool_choice
object
Forces the model to use a specific tool.
thinking
object
Configuration for extended thinking.
service_tier
string
The service tier for the request.

Params to Avoid