Generate content
Compatible with Google Gemini generateContent, for inference on conversational models. The official SDK works as-is.
post/v1beta/models/{model}:generateContent
Request
- Base URL: https://gateway.amux.ai
- URL: https://gateway.amux.ai/v1beta/models/{model}:generateContent
- Auth: API key in header x-goog-api-key
Path parameters
modelstring required
Canonical ID, given in the path (Gemini puts the model name and the action in the URL). Do not escape the slash in vendor/model. The colon suffixes work here too — :provider to pin one, :@strategy to choose an ordering — placed before the action (models/vendor/model:@price:generateContent).
Headers
Content-Typestring required
Always application/json.
Request body
Example request
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello!"
}
]
}
]
}Response
Inference succeeded.
Example response
{
"candidates": [
{
"content": {
"role": "user",
"parts": [
{
"text": "Hello!"
}
]
},
"finishReason": "STOP"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.