Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key.
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
model string required
Model ID to use for the request
Value: gemini-3.6-flash
messages array required
Array of message objects representing the conversation history
role
stringrequiredMessage role
Options:
user,assistant,system,developer
content
string | arrayrequiredText string or OpenAI-compatible content array
max_tokens integer
Maximum tokens to generate in the completion
temperature number
Sampling temperature to use
top_p number
Nucleus sampling parameter
stream boolean
Whether to stream response incrementally
Response Format
error object
Error information, only present when status is failed
code
stringError code
message
stringDetailed error message
output array
Generation results, only present when status is completed
content
arrayList of generated resource content
type
stringResource type
Value:
image|videourl
stringProcessed resource URL
jobId
stringRemote task ID
usage object
Usage statistics, only present when status is completed
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information