Gemini text chat / media recognition.
Gemini `generateContent`-compatible endpoint for text chat and media recognition requests.
Path Parameters
Model ID in the Gemini-compatible interface path.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1beta/models/gemini-2.5-flash:generateContent" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "role": "user", "parts": [ { "text": "Hello, please introduce Models Hub." } ] } ] }'{
"candidates": [
{}
],
"promptFeedback": {},
"usageMetadata": {}
}{
"error": {
"code": "string",
"message": "string",
"request_id": "string"
}
}Responses format.
OpenAI Responses API-compatible endpoint, supporting single-turn/multi-turn input, tool calls, and reasoning parameters.
Playground chat debugging endpoint.
Playground chat debugging endpoint. This endpoint is derived from the current new-api router code and returns a unified management API response; the specific `data` structure varies by business object.