Saltar al contenido principal
POST
/
v1
/
chat
/
completions
curl --request POST \
  --url https://direct.evolink.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gemini-3.1-pro-preview-customtools",
  "messages": [
    {
      "role": "user",
      "content": "Please introduce yourself"
    }
  ]
}
'
{
  "id": "chatcmpl-20251010015944503180122WJNB8Eid",
  "model": "gemini-3.1-pro-preview-customtools",
  "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
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.evolink.ai/llms.txt

Use this file to discover all available pages before exploring further.

BaseURL: La BaseURL predeterminada es 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

Authorization
string
header
requerido

##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

application/json
model
enum<string>
predeterminado:gemini-3.1-pro-preview-customtools
requerido

Nombre del modelo de chat

Opciones disponibles:
gemini-3.1-pro-preview-customtools
Ejemplo:

"gemini-3.1-pro-preview-customtools"

messages
object[]
requerido

Lista de mensajes de chat, soporta diálogo de múltiples turnos y entrada multimodal

Minimum array length: 1
stream
boolean
predeterminado:false

Si se devuelve la respuesta en modo streaming

  • true: Retorno en streaming, recibe contenido en fragmentos en tiempo real
  • false: Devuelve la respuesta completa de una sola vez
Ejemplo:

false

max_completion_tokens
integer | null

Maximum number of completion tokens for the generated response, corresponding to Gemini's maxOutputTokens.

Rango requerido: 1 <= x <= 65536
Ejemplo:

2000

max_tokens
integer

Maximum number of tokens for the generated response, compatible with the legacy OpenAI parameter.

Rango requerido: 1 <= x <= 65536
Ejemplo:

2000

temperature
number
predeterminado:1

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
Rango requerido: 0 <= x <= 2
Ejemplo:

0.7

top_p
number
predeterminado:1

Parámetro de Nucleus Sampling

Descripción:

  • Controla el muestreo de tokens con probabilidad acumulada
  • Por ejemplo, 0.9 significa seleccionar entre tokens con probabilidad acumulada de hasta el 90%
  • Valor predeterminado: 1.0 (considera todos los tokens)

Recomendación: No ajustar temperature y top_p simultáneamente

Rango requerido: 0 <= x <= 1
Ejemplo:

0.9

frequency_penalty
number | null
predeterminado:0

Frequency penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's frequencyPenalty.

Rango requerido: -2 <= x <= 2
Ejemplo:

0

presence_penalty
number | null
predeterminado:0

Presence penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's presencePenalty.

Rango requerido: -2 <= x <= 2
Ejemplo:

0

stop

Stop sequences. Supports a string or string array, corresponding to Gemini's stopSequences.

n
integer | null
predeterminado:1

Number of generated candidates.

Rango requerido: x >= 1
Ejemplo:

1

reasoning_effort
enum<string> | null
predeterminado:medium

Limita el esfuerzo de razonamiento. Gemini 3 admite los niveles low/high; medium se asigna al nivel más alto y none no se admite.

Opciones disponibles:
low,
medium,
high
Ejemplo:

"medium"

seed
integer | null

Random seed used to make output as reproducible as possible, corresponding to Gemini's seed.

Ejemplo:

12345

logprobs
boolean | null
predeterminado:false

Whether to return token logprob information, corresponding to Gemini's responseLogprobs.

Ejemplo:

true

top_logprobs
integer | null

Number of top logprob values returned for each token, corresponding to Gemini's logprobs.

Rango requerido: 0 <= x <= 20
Ejemplo:

5

response_format
object

Response format settings, supporting JSON mode and JSON Schema, corresponding to Gemini's responseMimeType, responseSchema and responseJsonSchema.

stream_options
object

Streaming response options. Can be set when stream is true.

tools
object[] | null

List of tool definitions for Function Calling.

tool_choice

Controls tool-calling behavior.

Opciones disponibles:
none,
auto,
required
extra_body
object

Gemini extension parameters.

Respuesta

Completado de chat generado exitosamente

id
string

Identificador único para la completación de chat

Ejemplo:

"chatcmpl-20251010015944503180122WJNB8Eid"

model
string

Nombre del modelo realmente utilizado

Ejemplo:

"gemini-3.1-pro-preview-customtools"

object
enum<string>

Tipo de respuesta

Opciones disponibles:
chat.completion
Ejemplo:

"chat.completion"

created
integer

Marca de tiempo de creación

Ejemplo:

1760032810

choices
object[]

Lista de opciones de completado de chat

usage
object

Estadísticas de uso de tokens