cURL
curl --request POST \ --url https://api.ai.cc/v1beta/models/{model}:generateContent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "contents": [ { "role": "user", "parts": [ { "text": "draw a cat" } ] } ], "generationConfig": { "responseModalities": [ "TEXT", "IMAGE" ], "imageConfig": { "aspectRatio": "16:9", "imageSize": "4K" } } } '
{ "candidates": [ { "content": { "role": "<string>", "parts": [ {} ] }, "finishReason": "<string>", "safetyRatings": [ {} ] } ], "usageMetadata": { "promptTokenCount": 123, "candidatesTokenCount": 123, "totalTokenCount": 123 } }
Authentication is done using Bearer Token. Format: Authorization: Bearer sk-xxxxxx
Authorization: Bearer sk-xxxxxx
model name
Show child attributes
Successfully