Zum Hauptinhalt springen
POST
/
v1
/
chat
/
completions
curl --request POST \
  --url https://api.evolink.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "Gemini-3.0-pro",
  "messages": [
    {
      "role": "user",
      "content": "Please introduce yourself"
    }
  ]
}
'
{
  "id": "chatcmpl-20251010015944503180122WJNB8Eid",
  "model": "Gemini-3.0-pro",
  "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."
      },
      "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-3.0-pro
erforderlich

Chat-Modellname

Verfügbare Optionen:
Gemini-3.0-pro
Beispiel:

"Gemini-3.0-pro"

messages
object[]
erforderlich

Liste der Chat-Nachrichten, unterstützt Mehrrunden-Dialog und multimodale Eingabe

Minimum array length: 1
stream
boolean

Ob die Antwort im Streaming-Modus zurückgegeben werden soll

  • true: Streaming-Rückgabe, empfängt Inhalte in Echtzeit-Blöcken
  • false: Gibt die vollständige Antwort auf einmal zurück
Beispiel:

false

max_tokens
integer

Maximale Anzahl von Token für die generierte Antwort

Beschreibung:

  • Ein zu kleiner Wert kann zur Kürzung der Antwort führen
Erforderlicher Bereich: x >= 1
Beispiel:

2000

temperature
number

Sampling-Temperatur, steuert die Zufälligkeit der Ausgabe

Beschreibung:

  • Niedrigere Werte (z. B. 0.2): Deterministischere, fokussiertere Ausgabe
  • Höhere Werte (z. B. 1.5): Zufälligere, kreativere Ausgabe
Erforderlicher Bereich: 0 <= x <= 2
Beispiel:

0.7

top_p
number

Nucleus-Sampling-Parameter

Beschreibung:

  • Steuert die Auswahl aus Tokens mit kumulativer Wahrscheinlichkeit
  • Beispiel: 0,9 bedeutet Auswahl aus Tokens mit kumulativer Wahrscheinlichkeit bis zu 90 %
  • Standard: 1.0 (berücksichtigt alle Tokens)

Empfehlung: temperature und top_p nicht gleichzeitig anpassen

Erforderlicher Bereich: 0 <= x <= 1
Beispiel:

0.9

top_k
integer

Top-K-Sampling-Parameter

Beschreibung:

  • Zum Beispiel bedeutet 10, dass das Sampling auf die 10 wahrscheinlichsten Token beschränkt wird
  • Kleinere Werte machen die Ausgabe fokussierter
  • Standard: kein Limit
Erforderlicher Bereich: x >= 1
Beispiel:

40

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-3.0-pro"

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