Zum Hauptinhalt springen
POST
/
v1
/
chat
/
completions
gemini-2.5-flash Schnell-Chat
curl --request POST \
  --url https://api.evolink.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gemini-2.5-flash",
  "messages": [
    {
      "role": "user",
      "content": "Hello, introduce yourself"
    }
  ]
}
'
{
  "id": "chatcmpl-20251010015944503180122WJNB8Eid",
  "model": "gemini-2.5-flash",
  "object": "chat.completion",
  "created": 1760032810,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Note: This is sample code!\n\nHello! I'm pleased to introduce myself.\n\nI'm a Large Language Model, trained and developed by Google..."
      },
      "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
  }
}

Autorisierungen

Authorization
string
header
erforderlich

##Alle APIs erfordern Bearer-Token-Authentifizierung##

API-Schlüssel erhalten:

Besuchen Sie die API-Schlüsselverwaltungsseite, um Ihren API-Schlüssel zu erhalten

Zum Anfrage-Header hinzufügen:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
enum<string>
Standard:gemini-2.5-flash
erforderlich

Chat-Modellname

Verfügbare Optionen:
gemini-2.5-flash
Beispiel:

"gemini-2.5-flash"

messages
object[]
erforderlich

Liste der Chat-Nachrichten

Minimum array length: 1
Beispiel:
[
{
"role": "user",
"content": "Hello, introduce yourself"
}
]

Antwort

Chat-Vervollständigung erfolgreich generiert

id
string

Eindeutiger Bezeichner für die Chat-Vervollständigung

Beispiel:

"chatcmpl-20251010015944503180122WJNB8Eid"

model
string

Tatsächlich verwendeter Modellname

Beispiel:

"gemini-2.5-flash"

object
enum<string>

Antworttyp

Verfügbare Optionen:
chat.completion
Beispiel:

"chat.completion"

created
integer

Erstellungszeitstempel

Beispiel:

1760032810

choices
object[]

Liste der Chat-Vervollständigungsoptionen

usage
object

Token-Nutzungsstatistiken