curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3.6-flash",
"messages": [
{
"role": "user",
"content": "Please introduce yourself"
}
]
}
'{
"id": "chatcmpl-20251010015944503180122WJNB8Eid",
"model": "gemini-3.6-flash",
"object": "chat.completion",
"created": 1760032810,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm pleased to introduce myself.\n\nI'm a Large Language Model, trained and developed by Google.\n\nSimply put, you can think of me as a \"smart brain\" that has been trained on massive amounts of text data and is able to understand and generate human language. My core capability is processing and generating text. Specifically, I can do the following:\n\n**1. Information Query & Knowledge Answering**\nI can act like a \"talking encyclopedia,\" answering various questions, whether they're about scientific knowledge, historical events, or everyday facts.\n\n**2. Creative Writing & Text Generation**\nI can create various types of text based on your requirements, such as:\n* **Writing**: Poetry, stories, scripts, emails, speeches, advertising copy, etc.\n* **Planning**: Travel plans, study outlines, event proposals, etc.\n* **Brainstorming**: Working with you to generate new ideas and spark creativity.\n\n**3. Translation & Language Processing**\nI'm proficient in multiple languages and can provide fast, fluent translation services. I can also help you polish, proofread, summarize, or rewrite text to make your expression clearer and more professional.\n\n**4. Programming & Code Assistance**\nI can write code snippets, explain code logic, debug errors, or \"translate\" code from one programming language to another, making me a helpful companion for programmers.\n\n**5. Logical Analysis & Reasoning**\nI can help you analyze complex problems, organize logical chains, and make inferences and summaries based on the information you provide.\n\n---\n\n**In summary**, my goal is to be a powerful and useful tool that helps you obtain information more efficiently, complete tasks, and spark creativity through natural language communication.\n\n**Remember:** I'm an artificial intelligence, my knowledge comes from the data I've learned, and it may not be the most up-to-date. Sometimes I may also make mistakes, so for very important information, I recommend you verify it again.",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 1891,
"total_tokens": 1904,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 13,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 1480
},
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": null
}
}{
"error": {
"code": 400,
"message": "Parámetros de solicitud inválidos",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Cuota insuficiente",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "gemini-3.6-flash"
}
}{
"error": {
"code": 413,
"message": "Image file too large",
"type": "request_too_large_error",
"param": "content",
"fallback_suggestion": "compress image to under 10MB"
}
}{
"error": {
"code": 429,
"message": "Semilla aleatoria, rango `[1, 2147483647]`\n\n**Nota:**\n- Usar el mismo valor de semilla puede mantener resultados de generación consistentes\n- Dejar vacío para semilla aleatoria",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Error interno del servidor",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Servicio temporalmente no disponible",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}Interfaz de todos los modelos Gemini - formato compatible con OpenAI
Selecciona el modelo de texto Gemini que deseas invocar mediante model en el cuerpo de la solicitud (consulta la tabla de referencia del parámetro model para ver todos los valores posibles).
- Usa el formato OpenAI SDK / Chat Completions y devuelve el contenido de la conversación de forma síncrona
- Entrada de texto plano / multimodal: entrada mixta de texto + imagen (
messages[].content) - Streaming: establece
stream: truepara recibir la respuesta fragmento a fragmento
Especificaciones y diferencias de los modelos
- Comportamiento de 3.8: en comparación con 3.7, mejora la ingeniería de software, los agentes, el razonamiento multipaso y la precisión multimodal; puede consumir más tokens de razonamiento / salida, especialmente con
high. Usalowcuando la latencia sea crítica, el valor predeterminadomediumpara uso general yhighpara código complejo, vídeos largos o razonamiento multipaso. - Parámetros de muestreo / penalización
temperature/top_p/frequency_penalty/presence_penalty: consistente en toda la serie Gemini 3.x, los valores personalizados no afectan a la salida;temperature/top_pdevuelven un 400 si están fuera de rango, yfrequency_penalty/presence_penaltyse ignoran y no surten efecto (no producen error). - Control del razonamiento
reasoning_effort:minimal/low/medium/high(consulta el parámetroreasoning_effortpara ver los niveles admitidos y el valor por defecto de cada modelo); solo surte efecto en la serie Gemini 3.x.gemini-3.8-flash/gemini-3.7-flashy la serie Pro no admitenminimal; si se envía, se degrada automáticamente alow. - Rol del último turno: el
roledel último mensaje no puede serassistant(Gemini 3.5+ devuelve un error). - Límite de tokens:
gemini-3.8-flash/gemini-3.7-flash/gemini-3.6-flash/gemini-3.5-flash-litetienen un contexto de 1,048,576 y una salida máxima de 65,536; el resto de los modelos se rigen por sus propias especificaciones.
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3.6-flash",
"messages": [
{
"role": "user",
"content": "Please introduce yourself"
}
]
}
'{
"id": "chatcmpl-20251010015944503180122WJNB8Eid",
"model": "gemini-3.6-flash",
"object": "chat.completion",
"created": 1760032810,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm pleased to introduce myself.\n\nI'm a Large Language Model, trained and developed by Google.\n\nSimply put, you can think of me as a \"smart brain\" that has been trained on massive amounts of text data and is able to understand and generate human language. My core capability is processing and generating text. Specifically, I can do the following:\n\n**1. Information Query & Knowledge Answering**\nI can act like a \"talking encyclopedia,\" answering various questions, whether they're about scientific knowledge, historical events, or everyday facts.\n\n**2. Creative Writing & Text Generation**\nI can create various types of text based on your requirements, such as:\n* **Writing**: Poetry, stories, scripts, emails, speeches, advertising copy, etc.\n* **Planning**: Travel plans, study outlines, event proposals, etc.\n* **Brainstorming**: Working with you to generate new ideas and spark creativity.\n\n**3. Translation & Language Processing**\nI'm proficient in multiple languages and can provide fast, fluent translation services. I can also help you polish, proofread, summarize, or rewrite text to make your expression clearer and more professional.\n\n**4. Programming & Code Assistance**\nI can write code snippets, explain code logic, debug errors, or \"translate\" code from one programming language to another, making me a helpful companion for programmers.\n\n**5. Logical Analysis & Reasoning**\nI can help you analyze complex problems, organize logical chains, and make inferences and summaries based on the information you provide.\n\n---\n\n**In summary**, my goal is to be a powerful and useful tool that helps you obtain information more efficiently, complete tasks, and spark creativity through natural language communication.\n\n**Remember:** I'm an artificial intelligence, my knowledge comes from the data I've learned, and it may not be the most up-to-date. Sometimes I may also make mistakes, so for very important information, I recommend you verify it again.",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 1891,
"total_tokens": 1904,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 13,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 1480
},
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": null
}
}{
"error": {
"code": 400,
"message": "Parámetros de solicitud inválidos",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Cuota insuficiente",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "gemini-3.6-flash"
}
}{
"error": {
"code": 413,
"message": "Image file too large",
"type": "request_too_large_error",
"param": "content",
"fallback_suggestion": "compress image to under 10MB"
}
}{
"error": {
"code": 429,
"message": "Semilla aleatoria, rango `[1, 2147483647]`\n\n**Nota:**\n- Usar el mismo valor de semilla puede mantener resultados de generación consistentes\n- Dejar vacío para semilla aleatoria",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Error interno del servidor",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Servicio temporalmente no disponible",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}https://direct.evolink.ai, que ofrece mejor compatibilidad con modelos de texto y admite conexiones persistentes. https://api.evolink.ai es el endpoint principal para servicios multimodales y actúa como dirección de respaldo para los modelos de texto.Autorizaciones
##Todas las APIs requieren autenticación Bearer Token##
Obtener API Key:
Visita la Página de gestión de API Key para obtener tu API Key
Agregar al encabezado de la solicitud:
Authorization: Bearer YOUR_API_KEY
Cuerpo
Selecciona el modelo de texto Gemini que deseas invocar:
| ID del modelo | Serie | Posicionamiento |
|---|---|---|
gemini-3.8-flash | 3.8 Flash | Ingeniería de software / agentes / razonamiento multipaso / precisión multimodal mejorados |
gemini-3.7-flash | 3.7 Flash | Agentic de nivel Pro / generación de código / ejecución en terminal |
gemini-3.6-flash | 3.6 Flash | Orquestación multipaso / refactorización de código / razonamiento general |
gemini-3.5-flash | 3.5 Flash | Flash general |
gemini-3.5-flash-lite | 3.5 Flash-Lite | Bajo costo / alto rendimiento / agente ligero |
gemini-3.1-pro-preview | 3.1 Pro (Preview) | Razonamiento avanzado |
gemini-3.1-pro-preview-customtools | 3.1 Pro · CustomTools | Razonamiento avanzado + herramientas personalizadas |
gemini-3.1-flash-lite-preview | 3.1 Flash-Lite (Preview) | Bajo costo |
gemini-3-pro-preview | 3.0 Pro (Preview) | Razonamiento avanzado |
gemini-3-flash-preview | 3.0 Flash (Preview) | Flash general |
gemini-2.5-pro | 2.5 Pro | Razonamiento avanzado |
gemini-2.5-flash | 2.5 Flash | Flash general |
gemini-2.5-flash-lite | 2.5 Flash-Lite | Bajo costo |
gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-3.1-pro-preview-customtools, gemini-3.1-flash-lite-preview, gemini-3-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite "gemini-3.6-flash"
Lista de mensajes de chat, soporta diálogo de múltiples turnos y entrada multimodal
1Show child attributes
Show child attributes
Si se devuelve la respuesta en modo streaming
true: Retorno en streaming, recibe contenido en fragmentos en tiempo realfalse: Devuelve la respuesta completa de una sola vez
false
Maximum number of completion tokens for the generated response, corresponding to Gemini's maxOutputTokens.
gemini-3.8-flash / gemini-3.7-flash / gemini-3.6-flash / gemini-3.5-flash-lite tienen un límite de 65,536 tokens; el resto de los modelos se rigen por sus propias especificaciones.
1 <= x <= 655362000
Maximum number of tokens for the generated response, compatible with the legacy OpenAI parameter.
1 <= x <= 655362000
Temperatura de muestreo, controla la aleatoriedad de la salida
Descripción:
- Valores más bajos (ej., 0.2): Salida más determinista y enfocada
- Valores más altos (ej., 1.5): Salida más aleatoria y creativa
Consistente en toda la serie Gemini 3.x (no varía según el modelo): los valores personalizados dentro del rango válido no afectan a la salida; los valores fuera del rango válido de este parámetro devuelven un 400 en lugar de ignorarse de forma silenciosa.
0 <= x <= 20.7
Parámetro de muestreo Nucleus (Nucleus Sampling)
Descripción:
- Controla el muestreo de tokens con probabilidad acumulativa
- Por ejemplo, 0.9 significa seleccionar de tokens con probabilidad acumulativa hasta el 90%
- Valor por defecto: 0.95
Recomendación: No ajustes temperature y top_p simultáneamente
Consistente en toda la serie Gemini 3.x (no varía según el modelo): los valores personalizados dentro del rango válido no afectan a la salida; los valores fuera del rango válido de este parámetro devuelven un 400 en lugar de ignorarse de forma silenciosa.
0 <= x <= 10.9
Frequency penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's frequencyPenalty.
Consistente en toda la serie Gemini 3.x: los valores enviados se ignoran y no surten efecto (no producen error).
-2 <= x <= 20
Presence penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's presencePenalty.
Consistente en toda la serie Gemini 3.x: los valores enviados se ignoran y no surten efecto (no producen error).
-2 <= x <= 20
Stop sequences. Supports a string or string array, corresponding to Gemini's stopSequences.
Número de candidatos a generar
Gemini 3.x solo admite 1; enviar un valor >1 devuelve un 400 (equivale al candidateCount ya eliminado en la API nativa).
1 <= x <= 11
Limita el esfuerzo de razonamiento; corresponde al nivel de razonamiento de Gemini:
minimal: razonamiento casi nulo, alto rendimiento / baja latencialow: menos razonamiento, tareas simplesmedium: equilibrio entre calidad y velocidadhigh: razonamiento profundo de múltiples pasos
Solo surte efecto en la serie Gemini 3.x, y los niveles admitidos y el valor por defecto difieren según el modelo (igual que en la API nativa):
| Modelo | Niveles admitidos | Por defecto |
|---|---|---|
gemini-3.8-flash | low / medium / high | medium |
gemini-3.7-flash | low / medium / high | medium |
gemini-3.6-flash | minimal / low / medium / high | medium |
gemini-3.5-flash | minimal / low / medium / high | medium |
gemini-3.5-flash-lite | minimal / low / medium / high | minimal |
gemini-3.1-flash-lite-preview | minimal / low / medium / high | minimal |
gemini-3-flash-preview | minimal / low / medium / high | medium |
gemini-3.1-pro-preview | low / medium / high | high |
gemini-3.1-pro-preview-customtools | low / medium / high | high |
gemini-3-pro-preview | low / medium / high | high |
Enviar un nivel no admitido por el modelo (por ejemplo, enviar minimal a la serie Pro o a gemini-3.8-flash / gemini-3.7-flash) se degrada automáticamente a low y no produce error.
minimal, low, medium, high "minimal"
Random seed used to make output as reproducible as possible, corresponding to Gemini's seed.
12345
Response format settings, supporting JSON mode and JSON Schema, corresponding to Gemini's responseMimeType, responseSchema and responseJsonSchema.
- Option 1
- Option 2
Show child attributes
Show child attributes
Streaming response options. Can be set when stream is true.
Show child attributes
Show child attributes
List of tool definitions for Function Calling.
Show child attributes
Show child attributes
Controls tool-calling behavior.
none, auto, required Gemini extension parameters.
Show child attributes
Show child attributes
Respuesta
Completado de chat generado exitosamente
Identificador único para la completación de chat
"chatcmpl-20251010015944503180122WJNB8Eid"
Nombre del modelo realmente utilizado
"gemini-3.6-flash"
Tipo de respuesta
chat.completion "chat.completion"
Marca de tiempo de creación
1760032810
Lista de opciones de completado de chat
Show child attributes
Show child attributes
Estadísticas de uso de tokens
Show child attributes
Show child attributes