cURL
curl --request POST \ --url https://apiif.com/v1beta/models/{model}:generateContent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "contents": [ { "role": "user", "parts": [ { "text": "Hello, please introduce yourself" } ] } ] } '
{ "code": 200, "data": { "candidates": [ { "content": { "role": "model", "parts": [ { "text": "Hello! I'm pleased to introduce myself.\n\nI am a large language model, trained and developed by Google..." } ] }, "finishReason": "STOP", "index": 0, "safetyRatings": [ { "category": "HARM_CATEGORY_HATE_SPEECH", "probability": "NEGLIGIBLE" } ] } ], "promptFeedback": { "safetyRatings": [ { "category": "HARM_CATEGORY_HATE_SPEECH", "probability": "NEGLIGIBLE" } ] } }, "usageMetadata": { "promptTokenCount": 4, "candidatesTokenCount": 611, "totalTokenCount": 2422, "thoughtsTokenCount": 1807, "promptTokensDetails": [ { "modality": "TEXT", "tokenCount": 4 } ] } }
Call Gemini models using Google Native API format. Synchronous processing with minimal parameters for quick start.
All endpoints require Authorization: Bearer YOUR_API_KEY.
Authorization: Bearer YOUR_API_KEY
Model name (e.g. gemini-2.5-pro)
1
Show child attributes
Successful Gemini response