As low as
3% of official pricing,
StartExample: at 0.2 model rate, pay 10.00 → usable $50.00. Balance is usable across all models. Actual pricing is subject to the website display.
Gemini 2.5 Pro API Documentation#
Gemini 2.5 Pro is designed for conversational AI, content generation, coding assistance, document analysis, and agent workflows. With YesAPI.online, you can access the model through a stable Base URL, unified authentication, and consistent request patterns.Base URL#
Authentication#
Model Name#
| Field | Value |
|---|
| Model | gemini-2-5-pro |
| API type | chat completions API |
Request Endpoint#
POST https://yesapi.online/v1/chat/completionsRequest Parameters#
| Parameter | Type | Required | Default | Description |
|---|
model | string | Yes | - | Fixed value: gemini-2-5-pro |
prompt | string | No | - | Task prompt or instruction |
messages | array | Yes | - | Conversation messages for chat models |
stream | boolean | No | false | Enable streaming output for supported chat models |
callback_url | string | No | - | Callback URL for asynchronous media tasks |
Request Example#
Response Example#
{
"id": "task_or_response_example",
"model": "gemini-2-5-pro",
"status": "succeeded",
"created": 1784534400
}
Response Fields#
| Field | Type | Description |
|---|
id | string | Request or task ID |
model | string | Model used for the request |
status | string | Task status for asynchronous APIs |
usage | object | Token or usage details when available |
error | object | Error details when the request fails |
Python Example#
Node.js Example#
Error Codes#
| Status | Type | How to Fix |
|---|
400 | Invalid request | Check required fields and parameter formats |
401 | Unauthorized | Verify your API key and Authorization header |
402 | Insufficient balance | Check account balance or plan quota |
429 | Rate limited | Reduce concurrency or add retry backoff |
500 | Service error | Retry later and keep the request ID for support |
Best Practices#
Keep prompts explicit and include output requirements.
Store request IDs and business IDs for tracing.
Use callbacks or polling for asynchronous media generation.
Use the YesAPI recharge page and model list to manage cost and model selection.
As low as
3% of official pricing,
StartExample: at 0.2 model rate, pay 10.00 → usable $50.00. Balance is usable across all models. Actual pricing is subject to the website display.