Request
Response
Parameters
header
An optional header used for spend logging metadata, containing JSON properties like
user_id, project_id, and env.string
required
Name of the model to use (for example:
gpt-5-mini). To see the complete list of supported models, visit: https://znapai.com/models/chatstring | array
required
The user input. Can be a plain string for simple text prompts, or an array of message objects for multimodal and multi-turn conversations.
number
Controls output randomness between 0 and 2. Lower values (like
0.2) make the output more deterministic, higher values (like 1.8) make it more creative.Default: 1.0integer
The maximum number of tokens to generate. Different models have different maximum limits.
boolean
Whether to stream the response as it is generated (SSE format).Default:
falsenumber
Controls diversity via nucleus sampling (range 0 to 1). Recommended to set either
temperature or top_p, but not both.Default: 1.0object
Controls reasoning effort for supported models (e.g.
gemini-2.5-flash, o3).array
A list of tools available for the model to extend its capabilities.
