Chat / Text
Gemini ProtocolComing Soon
Google Gemini generateContent compatible. Text capability implemented, in gray release, not yet open.
⏳ This model is not live yet. The doc below is a preview. It will be callable once released.
Endpoints
| Usage | Method | Path |
|---|---|---|
| Non-streaming | POST | /v1beta/models/{model}:generateContent |
| Streaming (SSE) | POST | /v1beta/models/{model}:streamGenerateContent |
Authentication
Authorization: Bearer <API_KEY> Content-Type: application/json
Supported Models
gemini-* (coming soon)
Request Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| contents | array | Required | Conversation (role/parts) |
| systemInstruction | object | — | System instruction |
| generationConfig | object | — | temperature/topP/maxOutputTokens, etc. |
| tools | — | — | Tools / function calling |
Streaming (SSE)
Use the :streamGenerateContent endpoint for SSE streaming.
Request Example
Non-streaming
curl -X POST "https://api.cqtai.com/v1beta/models/gemini-1.5-pro:generateContent" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"role":"user","parts":[{"text":"你好,介绍一下你自己"}]}]
}'Billing & Credits
Billed per token: input × input price + output × output price (cache write ×1.25, cache read ×0.1), then × your rate. count_tokens is free. See the Intro page for model prices.