Gemini Native Format
FastRouter API Key (Gemini style). Get yours at https://fastrouter.ai
Format: ?key=YOUR_API_KEY
The Gemini model ID to use (e.g. gemini-2.5-pro, gemini-2.5-flash).
gemini-2.5-proFastRouter API key (Gemini style: pass as query parameter).
Successful response with generated content.
Bad Request - The request is malformed. This could be due to missing parameters, invalid formats, or routing errors.
Note: the 400 body shape is not uniform. Validation errors return the structured object below, but routing/model errors may instead return a plain string: { "error": "<message>" }. A few endpoints (e.g. some file operations) may return a plain-text body rather than JSON.
Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.
Note: the 401 error body uses code, message, param, and type (there is no status field), and type is invalid_request_error.
Insufficient Credits - Your account or API key has run out of credits. Add more credits and retry the request.
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Error - Something went wrong on our side. Retry the request, and contact support if the issue persists.
Bad Gateway — failed to reach Google AI Studio.
FastRouter API Key (Gemini style). Get yours at https://fastrouter.ai
Format: ?key=YOUR_API_KEY
The Gemini model ID to use (e.g. gemini-2.5-pro, gemini-2.5-flash).
gemini-2.5-proFastRouter API key (Gemini style: pass as query parameter).
Streaming response with Server-Sent Events containing generated content chunks.
Each SSE event contains a JSON object with partial candidates and usage metadata.
Bad Request - The request is malformed. This could be due to missing parameters, invalid formats, or routing errors.
Note: the 400 body shape is not uniform. Validation errors return the structured object below, but routing/model errors may instead return a plain string: { "error": "<message>" }. A few endpoints (e.g. some file operations) may return a plain-text body rather than JSON.
Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.
Note: the 401 error body uses code, message, param, and type (there is no status field), and type is invalid_request_error.
Insufficient Credits - Your account or API key has run out of credits. Add more credits and retry the request.
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Error - Something went wrong on our side. Retry the request, and contact support if the issue persists.
Bad Gateway — failed to reach Google AI Studio.
Last updated
