Native Gemini format
Gemini's native generateContent format interface, used for Gemini series models. Compatible with /v1beta/models/{model}:generateContent. Supports inlineData passing in base64-encoded images, PDFs, audio and video.
Compatible with Google Gemini API. Replace {model} in the path with the specific model ID, such as gemini-2.5-pro. For streaming output please call :streamGenerateContent.
POST
/v1beta/models/{model}:generateContent
https://api.covanexus.com
Authorization
Body
Authorization
Authorization BearerAuth
Authorization Bearer <token>
Use Bearer Token authentication: Authorization: Bearer $COVA_NEXUS_API_KEY. Also compatible with Gemini-style x-goog-api-key: $COVA_NEXUS_API_KEY request header.
in: header
Request Body
application/json
contents* array[object]
Conversation content list, each item contains
role (user/model) and parts (such as [{"text":"..."}])systemInstruction? object
System-level instructions (including parts)
generationConfig? object
Generate configuration, including temperature, topP, topK, maxOutputTokens, stopSequences, etc.
safetySettings? array[object]
Security filtering settings
tools? array[object]
List of available tools (function calls)
Response Body
| status code | Type |
|---|---|
| 200 | application/json |
| 400 | application/json |
| 429 | application/json |
curl -X POST \
"https://api.covanexus.com/v1beta/models/gemini-2.5-pro:generateContent" \
-H "Authorization: Bearer $COVA_NEXUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{"role": "user", "parts": [{"text": "用一句话介绍你自己"}]}
]
}'200
400
429
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "string"
}
]
},
"finishReason": "STOP",
"index": 0,
"safetyRatings": []
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
}
}BearerAuth