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

# Gemini 3.5 Flash - OpenAI SDK - Vollständige Referenz

> - Aufruf des Gemini-3.5-flash Modells im OpenAI SDK-Format
- Synchroner Verarbeitungsmodus, gibt Gesprächsinhalte in Echtzeit zurück
- **Klartextgespräch**: Einzel- oder Mehrrunden-Kontextdialog, siehe simple_text und multi_turn Beispiele in den Codebeispielen
- **System-Prompt**: KI-Rolle und -Verhalten anpassen, siehe system_prompt Beispiel in den Codebeispielen
- **Multimodale Eingabe**: Unterstützt gemischte Text- + Bildeingabe, siehe vision und multi_image Beispiele in den Codebeispielen

<Note>
  **BaseURL**: Die Standard-BaseURL ist `https://direct.evolink.ai` und bietet bessere Unterstützung für Textmodelle sowie persistente Verbindungen. `https://api.evolink.ai` ist der primäre Endpunkt für multimodale Dienste und dient bei Textmodellen als Ausweichadresse.
</Note>


## OpenAPI

````yaml de/api-manual/language-series/gemini-3.5-flash/openai-sdk/openai-sdk-reference.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Gemini-3.5-flash Vollständige Referenz
  description: >-
    Vollständige API-Referenz für die Gemini-3.5-flash Chat-Schnittstelle,
    einschließlich aller Parameter und erweiterter Funktionen
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: Produktion (empfohlen)
  - url: https://api.evolink.ai
    description: Alternative URL
security:
  - bearerAuth: []
tags:
  - name: Chat-Vervollständigung
    description: KI-Chat-Vervollständigung zugehörige APIs
paths:
  /v1/chat/completions:
    post:
      tags:
        - Chat-Vervollständigung
      summary: Gemini-3.5-flash Chat-API
      description: >-
        - Aufruf des Gemini-3.5-flash Modells im OpenAI SDK-Format

        - Synchroner Verarbeitungsmodus, gibt Gesprächsinhalte in Echtzeit
        zurück

        - **Klartextgespräch**: Einzel- oder Mehrrunden-Kontextdialog, siehe
        simple_text und multi_turn Beispiele in den Codebeispielen

        - **System-Prompt**: KI-Rolle und -Verhalten anpassen, siehe
        system_prompt Beispiel in den Codebeispielen

        - **Multimodale Eingabe**: Unterstützt gemischte Text- + Bildeingabe,
        siehe vision und multi_image Beispiele in den Codebeispielen
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: Einrundige Textkonversation
                value:
                  model: gemini-3.5-flash
                  messages:
                    - role: user
                      content: Please introduce yourself
              multi_turn:
                summary: Mehrstufiges Gespräch (Kontextverständnis)
                value:
                  model: gemini-3.5-flash
                  messages:
                    - role: user
                      content: What is Python?
                    - role: assistant
                      content: Python is a high-level programming language...
                    - role: user
                      content: What are its advantages?
              system_prompt:
                summary: System-Prompt verwenden
                value:
                  model: gemini-3.5-flash
                  messages:
                    - role: system
                      content: >-
                        You are a professional Python programming assistant,
                        answering questions concisely.
                    - role: user
                      content: How to read a file?
              vision:
                summary: Multimodale Eingabe (Text + Bild)
                value:
                  model: gemini-3.5-flash
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: >-
                            Please describe the scene and main elements in this
                            image in detail.
                        - type: image_url
                          image_url:
                            url: https://example.com/image.png
              multi_image:
                summary: Mehrfachbildeingabe
                value:
                  model: gemini-3.5-flash
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: Compare the differences between these two images
                        - type: image_url
                          image_url:
                            url: https://example.com/image1.png
                        - type: image_url
                          image_url:
                            url: https://example.com/image2.png
      responses:
        '200':
          description: Chat-Vervollständigung erfolgreich generiert
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '400':
          description: Ungültige Anfrageparameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Ungültige Anfrageparameter
                  type: invalid_request_error
        '401':
          description: Nicht autorisiert, ungültiges oder abgelaufenes Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Unzureichendes Kontingent, Aufladung erforderlich
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Unzureichendes Kontingent
                  type: insufficient_quota_error
                  fallback_suggestion: https://evolink.ai/dashboard/billing
        '403':
          description: Zugriff verweigert
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  type: permission_error
                  param: model
        '404':
          description: Ressource nicht gefunden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Specified model not found
                  type: not_found_error
                  param: model
                  fallback_suggestion: gemini-3.5-flash
        '413':
          description: Anfragekörper zu groß
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: Image file too large
                  type: request_too_large_error
                  param: content
                  fallback_suggestion: compress image to under 10MB
        '429':
          description: Ratenlimit überschritten
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Ratenlimit überschritten
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: Interner Serverfehler
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Interner Serverfehler
                  type: internal_server_error
                  fallback_suggestion: try again later
        '502':
          description: Upstream-Dienstfehler
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_error
                  fallback_suggestion: try different model
        '503':
          description: Dienst vorübergehend nicht verfügbar
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Dienst vorübergehend nicht verfügbar
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: Chat-Modellname
          enum:
            - gemini-3.5-flash
          default: gemini-3.5-flash
          example: gemini-3.5-flash
        messages:
          type: array
          description: >-
            Liste der Chat-Nachrichten, unterstützt Mehrrunden-Dialog und
            multimodale Eingabe
          items:
            $ref: '#/components/schemas/Message'
          minItems: 1
        stream:
          type: boolean
          description: |-
            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
          example: false
          default: false
        max_completion_tokens:
          type: integer
          nullable: true
          description: >-
            Maximum number of completion tokens for the generated response,
            corresponding to Gemini's maxOutputTokens.
          minimum: 1
          example: 2000
          maximum: 65536
        max_tokens:
          type: integer
          description: >-
            Maximum number of tokens for the generated response, compatible with
            the legacy OpenAI parameter.
          minimum: 1
          example: 2000
          maximum: 65536
        temperature:
          type: number
          description: >-
            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
          minimum: 0
          maximum: 2
          example: 0.7
          default: 1
        top_p:
          type: number
          description: >-
            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
          minimum: 0
          maximum: 1
          example: 0.9
          default: 1
        frequency_penalty:
          type: number
          nullable: true
          description: >-
            Frequency penalty coefficient. Range: -2.0 to 2.0. Corresponds to
            Gemini's frequencyPenalty.
          minimum: -2
          maximum: 2
          default: 0
          example: 0
        presence_penalty:
          type: number
          nullable: true
          description: >-
            Presence penalty coefficient. Range: -2.0 to 2.0. Corresponds to
            Gemini's presencePenalty.
          minimum: -2
          maximum: 2
          default: 0
          example: 0
        stop:
          nullable: true
          description: >-
            Stop sequences. Supports a string or string array, corresponding to
            Gemini's stopSequences.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        'n':
          type: integer
          nullable: true
          description: Number of generated candidates.
          minimum: 1
          default: 1
          example: 1
        reasoning_effort:
          type: string
          nullable: true
          description: >-
            Begrenzt den Denkaufwand. Gemini 3 unterstützt die Denkstufen
            low/high; medium wird der höheren Stufe zugeordnet und none wird
            nicht unterstützt.
          enum:
            - low
            - medium
            - high
          default: medium
          example: medium
        seed:
          type: integer
          nullable: true
          description: >-
            Random seed used to make output as reproducible as possible,
            corresponding to Gemini's seed.
          example: 12345
        logprobs:
          type: boolean
          nullable: true
          description: >-
            Whether to return token logprob information, corresponding to
            Gemini's responseLogprobs.
          example: true
          default: false
        top_logprobs:
          type: integer
          nullable: true
          description: >-
            Number of top logprob values returned for each token, corresponding
            to Gemini's logprobs.
          minimum: 0
          maximum: 20
          example: 5
        response_format:
          description: >-
            Response format settings, supporting JSON mode and JSON Schema,
            corresponding to Gemini's responseMimeType, responseSchema and
            responseJsonSchema.
          oneOf:
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - json_object
                  example: json_object
                  description: Response format type.
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - json_schema
                  example: json_schema
                  description: Response format type.
                json_schema:
                  type: object
                  nullable: true
                  description: JSON Schema definition.
        stream_options:
          type: object
          nullable: true
          description: Streaming response options. Can be set when stream is true.
          properties:
            include_usage:
              type: boolean
              nullable: true
              description: >-
                Whether to include token usage for this request before streaming
                finishes.
              default: false
              example: true
        tools:
          type: array
          nullable: true
          description: List of tool definitions for Function Calling.
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          description: Controls tool-calling behavior.
          oneOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - $ref: '#/components/schemas/ToolChoiceObject'
        extra_body:
          type: object
          nullable: true
          description: Gemini extension parameters.
          properties:
            google:
              type: object
              nullable: true
              description: Gemini-specific extension parameters.
              properties:
                cached_content:
                  type: string
                  nullable: true
                  description: Gemini content cache.
                thinking_config:
                  type: object
                  nullable: true
                  description: Gemini ThinkingConfig.
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: Eindeutiger Bezeichner für die Chat-Vervollständigung
          example: chatcmpl-20251010015944503180122WJNB8Eid
        model:
          type: string
          description: Tatsächlich verwendeter Modellname
          example: gemini-3.5-flash
        object:
          type: string
          enum:
            - chat.completion
          description: Antworttyp
          example: chat.completion
        created:
          type: integer
          description: Erstellungszeitstempel
          example: 1760032810
        choices:
          type: array
          description: Liste der Chat-Vervollständigungsoptionen
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP-Status-Fehlercode
            message:
              type: string
              description: Fehlerbeschreibung
            type:
              type: string
              description: Fehlertyp
            param:
              type: string
              description: Zugehöriger Parametername
            fallback_suggestion:
              type: string
              description: Vorschlag bei Fehlerauftreten
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: |-
            Nachrichtenrolle

            - `user`: Benutzernachricht
            - `assistant`: KI-Assistenten-Nachricht (für Mehrrunden-Gespräche)
            - `system`: System-Prompt (legt Rolle und Verhalten der KI fest)
          enum:
            - user
            - assistant
            - system
            - tool
          example: user
        content:
          description: >-
            Message content. Supports two formats:


            **1. Plain text string**: You can pass a string directly, e.g.
            `"content":"Please introduce yourself"`


            **2. Object array** (supports text and multimodal input): see the
            example structure below
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
        tool_call_id:
          type: string
          nullable: true
          description: Tool call ID, used only when role=tool.
    Tool:
      type: object
      required:
        - type
        - function
      description: Tool definition for Function Calling.
      properties:
        type:
          type: string
          enum:
            - function
          description: Tool type. Currently only function is supported.
        function:
          type: object
          required:
            - name
          description: Function definition.
          properties:
            name:
              type: string
              description: Name of the function to call.
            description:
              type: string
              description: >-
                Function description used by the model to decide whether to call
                the tool.
            parameters:
              type: object
              description: Function request parameters described in JSON Schema format.
    ToolChoiceObject:
      type: object
      required:
        - type
        - function
      description: Scope of the tool to call.
      properties:
        type:
          type: string
          enum:
            - function
          description: Call type.
        function:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: Name of the tool to call.
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: Auswahlindex
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        logprobs:
          type: object
          nullable: true
          description: Token logprob information for this choice.
          properties:
            content:
              type: array
              nullable: true
              description: Logprob details for each output token.
              items:
                $ref: '#/components/schemas/LogProbToken'
        finish_reason:
          type: string
          description: Abschlussgrund
          enum:
            - stop
            - length
            - content_filter
            - tool_calls
          example: stop
    Usage:
      type: object
      description: Token-Nutzungsstatistiken
      properties:
        prompt_tokens:
          type: integer
          description: Anzahl der Tokens im Eingabeinhalt
          example: 13
        completion_tokens:
          type: integer
          description: Anzahl der Tokens im Ausgabeinhalt
          example: 1891
        total_tokens:
          type: integer
          description: Gesamtanzahl der Tokens
          example: 1904
        prompt_tokens_details:
          type: object
          description: Detaillierte Eingabe-Token-Informationen
          properties:
            cached_tokens:
              type: integer
              description: Anzahl der getroffenen zwischengespeicherten Tokens
              example: 0
            text_tokens:
              type: integer
              description: Anzahl der Text-Tokens
              example: 13
            audio_tokens:
              type: integer
              description: Anzahl der Audio-Tokens
              example: 0
            image_tokens:
              type: integer
              description: Anzahl der Bild-Tokens
              example: 0
        completion_tokens_details:
          type: object
          description: Detailed completion token information.
          properties:
            text_tokens:
              type: integer
              description: Number of text tokens.
              example: 0
            audio_tokens:
              type: integer
              description: Number of audio tokens.
              example: 0
            reasoning_tokens:
              type: integer
              description: Number of reasoning tokens.
              example: 1480
        input_tokens:
          type: integer
          description: Input token count (compatibility field).
          example: 0
        output_tokens:
          type: integer
          description: Output token count (compatibility field).
          example: 0
        input_tokens_details:
          type: object
          nullable: true
          description: Detailed input token information (compatibility field).
          example: null
    ContentPart:
      oneOf:
        - $ref: '#/components/schemas/TextContent'
        - $ref: '#/components/schemas/ImageContent'
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: Rolle des Nachrichtenabsenders
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: Inhalt der KI-Antwortnachricht
          example: >-
            Hello! I'm pleased to introduce myself.


            I'm a Large Language Model, trained and developed by Google.


            Simply 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:


            **1. Information Query & Knowledge Answering**

            I can act like a "talking encyclopedia," answering various
            questions, whether they're about scientific knowledge, historical
            events, or everyday facts.


            **2. Creative Writing & Text Generation**

            I can create various types of text based on your requirements, such
            as:

            *   **Writing**: Poetry, stories, scripts, emails, speeches,
            advertising copy, etc.

            *   **Planning**: Travel plans, study outlines, event proposals,
            etc.

            *   **Brainstorming**: Working with you to generate new ideas and
            spark creativity.


            **3. Translation & Language Processing**

            I'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.


            **4. Programming & Code Assistance**

            I 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.


            **5. Logical Analysis & Reasoning**

            I can help you analyze complex problems, organize logical chains,
            and make inferences and summaries based on the information you
            provide.


            ---


            **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.


            **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.
          nullable: true
        tool_calls:
          type: array
          nullable: true
          description: List of tool calls.
          items:
            $ref: '#/components/schemas/ToolCall'
    LogProbToken:
      type: object
      description: Logprob details for a single token.
      properties:
        token:
          type: string
          description: Token text.
        logprob:
          type: number
          description: Logprob value of the token.
        bytes:
          type: array
          nullable: true
          description: UTF-8 byte sequence of the token.
          items:
            type: integer
        top_logprobs:
          type: array
          nullable: true
          description: Candidate tokens at the same position and their logprobs.
          items:
            $ref: '#/components/schemas/TopLogProb'
    TextContent:
      title: Textinhalt
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
          description: Inhaltstyp
        text:
          type: string
          description: Textinhalt
          example: Please describe this image in detail
    ImageContent:
      title: Bildinhalt
      type: object
      required:
        - type
        - image_url
      properties:
        type:
          type: string
          enum:
            - image_url
          description: Inhaltstyp
        image_url:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
              description: >-
                Bild-URL-Adresse


                **Einschränkungen**:

                - Maximale Größe pro Bild: `10MB`

                - Unterstützte Formate: `.jpeg`, `.jpg`, `.png`, `.webp`

                - URL-Anforderungen: Muss öffentlich zugänglich sein, endet in
                der Regel mit einer Bilddateierweiterung
              example: https://example.com/image.png
    ToolCall:
      type: object
      required:
        - id
        - type
        - function
      properties:
        id:
          type: string
          description: Tool call ID.
        type:
          type: string
          enum:
            - function
          description: Tool call type.
        function:
          type: object
          required:
            - name
            - arguments
          properties:
            name:
              type: string
              description: Function name.
            arguments:
              type: string
              description: Function arguments as a JSON string.
    TopLogProb:
      type: object
      description: Logprob details for a candidate token.
      properties:
        token:
          type: string
          description: Candidate token text.
        logprob:
          type: number
          description: Logprob value of the candidate token.
        bytes:
          type: array
          nullable: true
          description: UTF-8 byte sequence of the candidate token.
          items:
            type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##Alle APIs erfordern Bearer-Token-Authentifizierung##


        **API-Schlüssel erhalten:**


        Besuchen Sie die
        [API-Schlüsselverwaltungsseite](https://evolink.ai/dashboard/keys), um
        Ihren API-Schlüssel zu erhalten


        **Zum Anfrage-Header hinzufügen:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````