Skip to content
Good MorningDocs
Dashboard

Gemini generateContent / streamGenerateContent

POST
/v1beta/models/{modelAndAction}
curl --request POST \
--url https://api.saygm.com/v1beta/models/gemini-2.5-pro%3AgenerateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'

Gemini-compatible endpoint. modelAndAction is the model id and method joined by a colon, for example gemini-2.5-pro:generateContent or gemini-2.5-pro:streamGenerateContent. Use the Google GenAI client with the base URL set to https://api.saygm.com. Authenticate with a GM API key as a bearer token or through Gemini’s native key query parameter.

modelAndAction
required
string
Example
gemini-2.5-pro:generateContent
Media typeapplication/json
object
Examplegenerated
{}

A Gemini response object, or a text/event-stream for streamGenerateContent.

object
Examplegenerated
{}

Invalid request (e.g. unknown model).

Media typeapplication/json
object
error
object
message
string
type
string
code
string | null
Examplegenerated
{
"error": {
"message": "example",
"type": "example",
"code": "example"
}
}