cURL
Google
Gemini Completions
POST
cURL
The TTAPI proxy for the Gemini Chat API uses TT-API-KEY in the request header for authentication, while all other request and response parameters remain consistent with the official API. For details,
refer to the Google official documentation.
Authorizations
You can obtain your API key from the TTAPI Dashboard.
Body
application/json
Example:
[{ "role": "user", "content": "Hello!" }]Models supported by TTAPI, see Gemini Supported Models
Whether to use server-sent events for progressive response transmission
Response
Successful response (stream=false returns JSON, stream=true returns Gemini stream)
List of response results
Response creation timestamp (seconds)
Example:
1757472417
Unique request identifier
Example:
"oebAaMTvMfCUjMcP_prYwAs"
Gemini model version used
Example:
"gemini-2.5-pro"
Response object type
Example:
"chat.completion"
Token usage statistics
Last modified on June 12, 2026