> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seekr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create chat completion

> Generate a chat completion response from a deployed model.



## OpenAPI

````yaml post /v1/inference/chat/completions
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.48.1
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/inference/chat/completions:
    post:
      tags:
        - Inference
      summary: Create a chat completion
      operationId: route_chat_completion_v1_inference_chat_completions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            example:
              model: meta-llama/Llama-3.1-8B-Instruct
              messages:
                - role: system
                  content: You are a helpful assistant.
                - role: user
                  content: What is the capital of France?
              max_completion_tokens: 128
              temperature: 0.7
              stream: false
        required: true
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
            text/event-stream:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ChatCompletionStreamResponse'
                description: >-
                  Sent as server-sent events. The body is a sequence of `data:
                  <chunk>` lines separated by blank lines and terminated by
                  `data: [DONE]`, where each `<chunk>` is an object of the shape
                  below.
        '400':
          description: Malformed request body, or `model` missing.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '403':
          description: >-
            The requested model is not a base model and is not deployed for your
            team.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '422':
          description: Deployment not found, or the request is unprocessable.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '502':
          description: Backend disconnected before sending a response.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '503':
          description: No healthy backend available for the requested model.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
      security:
        - APIKeyHeader: []
components:
  schemas:
    ChatCompletionRequest:
      additionalProperties: true
      properties:
        messages:
          items:
            $ref: '#/components/schemas/ChatCompletionMessageParam'
          title: Messages
          type: array
        model:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Model
        frequency_penalty:
          anyOf:
            - type: number
            - type: 'null'
          default: 0
          title: Frequency Penalty
        logit_bias:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          default: null
          title: Logit Bias
        logprobs:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Logprobs
        top_logprobs:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Top Logprobs
        max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          deprecated: true
          title: Max Tokens
        max_completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Max Completion Tokens
        'n':
          anyOf:
            - type: integer
            - type: 'null'
          default: 1
          title: 'N'
        presence_penalty:
          anyOf:
            - type: number
            - type: 'null'
          default: 0
          title: Presence Penalty
        response_format:
          anyOf:
            - $ref: '#/components/schemas/ResponseFormat'
            - $ref: '#/components/schemas/StructuralTagResponseFormat'
            - $ref: '#/components/schemas/LegacyStructuralTagResponseFormat'
            - type: 'null'
          default: null
          title: Response Format
        seed:
          anyOf:
            - maximum: 9223372036854776000
              minimum: -9223372036854776000
              type: integer
            - type: 'null'
          default: null
          title: Seed
        stop:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          default: []
          title: Stop
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Stream
        stream_options:
          anyOf:
            - $ref: '#/components/schemas/StreamOptions'
            - type: 'null'
          default: null
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Temperature
        top_p:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Top P
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionToolsParam'
              type: array
            - type: 'null'
          default: null
          title: Tools
        tool_choice:
          anyOf:
            - const: none
              type: string
            - const: auto
              type: string
            - const: required
              type: string
            - $ref: '#/components/schemas/ChatCompletionNamedToolChoiceParam'
            - type: 'null'
          default: none
          title: Tool Choice
        reasoning_effort:
          anyOf:
            - enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
              type: string
            - type: 'null'
          default: null
          description: >-
            Constrains effort on reasoning for reasoning models. Currently
            supported values are none, minimal, low, medium, high, xhigh, and
            max. Reducing reasoning effort can result in faster responses and
            fewer tokens used on reasoning in a response.
          title: Reasoning Effort
        thinking_token_budget:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            Maximum number of tokens allowed for thinking operations (reasoning
            models). Non-negative integer sets the limit; -1 means unlimited
            (treated as unset).
          title: Thinking Token Budget
        include_reasoning:
          default: true
          title: Include Reasoning
          type: boolean
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
          default: true
          title: Parallel Tool Calls
        user:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: User
        use_beam_search:
          default: false
          title: Use Beam Search
          type: boolean
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Top K
        min_p:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Min P
        repetition_penalty:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Repetition Penalty
        length_penalty:
          default: 1
          title: Length Penalty
          type: number
        stop_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: []
          title: Stop Token Ids
        include_stop_str_in_output:
          default: false
          title: Include Stop Str In Output
          type: boolean
        ignore_eos:
          default: false
          title: Ignore Eos
          type: boolean
        min_tokens:
          default: 0
          title: Min Tokens
          type: integer
        skip_special_tokens:
          default: true
          title: Skip Special Tokens
          type: boolean
        spaces_between_special_tokens:
          default: true
          title: Spaces Between Special Tokens
          type: boolean
        truncate_prompt_tokens:
          anyOf:
            - maximum: 9223372036854776000
              minimum: -1
              type: integer
            - type: 'null'
          default: null
          title: Truncate Prompt Tokens
        truncation_side:
          anyOf:
            - enum:
                - left
                - right
              type: string
            - type: 'null'
          default: null
          description: >-
            Which side to truncate from when truncate_prompt_tokens is active.
            'right' keeps the first N tokens. 'left' keeps the last N tokens.
          title: Truncation Side
        prompt_logprobs:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Prompt Logprobs
        logprob_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          description: >-
            Specific vocab token IDs to return logprobs for at each generated
            position, in addition to the sampled token. Requires
            `logprobs=True`.
          title: Logprob Token Ids
        allowed_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Allowed Token Ids
        bad_words:
          items:
            type: string
          title: Bad Words
          type: array
        echo:
          default: false
          description: >-
            If true, the new message will be prepended with the last message if
            they belong to the same role.
          title: Echo
          type: boolean
        add_generation_prompt:
          default: true
          description: >-
            If true, the generation prompt will be added to the chat template.
            This is a parameter used by chat template in tokenizer config of the
            model.
          title: Add Generation Prompt
          type: boolean
        continue_final_message:
          default: false
          description: >-
            If this is set, the chat will be formatted so that the final message
            in the chat is open-ended, without any EOS tokens. The model will
            continue this message rather than starting a new one. This allows
            you to "prefill" part of the model's response for it. Cannot be used
            at the same time as `add_generation_prompt`.
          title: Continue Final Message
          type: boolean
        add_special_tokens:
          default: false
          description: >-
            If true, special tokens (e.g. BOS) will be added to the prompt on
            top of what is added by the chat template. For most models the chat
            template takes care of adding the special tokens, so this should be
            left false.
          title: Add Special Tokens
          type: boolean
        documents:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          default: null
          description: >-
            A list of dicts representing documents that will be accessible to
            the model if it is performing RAG (retrieval-augmented generation).
            If the template does not support RAG, this argument will have no
            effect. Each document should contain "title" and "text" keys.
          title: Documents
        chat_template:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            A Jinja template to use for this conversion. As of transformers
            v4.44, the default chat template is no longer allowed, so you must
            provide a chat template if the tokenizer does not define one.
          title: Chat Template
        chat_template_kwargs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: >-
            Additional keyword args to pass to the template renderer. Will be
            accessible by the chat template.
          title: Chat Template Kwargs
        media_io_kwargs:
          anyOf:
            - additionalProperties:
                additionalProperties: true
                type: object
              type: object
            - type: 'null'
          default: null
          description: >-
            Additional kwargs to pass to the media IO connectors, keyed by
            modality. Merged with engine-level media_io_kwargs.
          title: Media Io Kwargs
        mm_processor_kwargs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Additional kwargs to pass to the HF processor.
          title: Mm Processor Kwargs
        structured_outputs:
          anyOf:
            - $ref: '#/components/schemas/StructuredOutputsParams'
            - type: 'null'
          default: null
          description: Additional kwargs for structured outputs
        priority:
          default: 0
          description: >-
            The priority of the request (lower means earlier handling; default:
            0). Any priority other than 0 will raise an error if the served
            model does not use priority scheduling.
          maximum: 9223372036854776000
          minimum: -9223372036854776000
          title: Priority
          type: integer
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The request_id related to this request. If the caller does not set
            it, a random uuid will be generated. This id is used throughout the
            inference process and returned in the response.
          title: Request Id
        return_tokens_as_token_ids:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            If specified with 'logprobs', tokens are represented as strings of
            the form 'token_id:{token_id}' so that tokens that are not
            JSON-encodable can be identified.
          title: Return Tokens As Token Ids
        return_token_ids:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            If specified, the result will include token IDs alongside the
            generated text. In streaming mode, prompt_token_ids is included only
            in the first chunk, and token_ids contains the delta tokens for each
            chunk.
          title: Return Token Ids
        return_prompt_text:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            If true, the response will include `prompt_text` containing the
            prompt string produced by chat templating. In streaming mode it is
            sent only on the first chunk.
          title: Return Prompt Text
        cache_salt:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            If specified, the prefix cache will be salted with the provided
            string to prevent an attacker from guessing prompts in multi-user
            environments. The salt should be random, protected from access by
            3rd parties, and long enough to be unpredictable.
          title: Cache Salt
        kv_transfer_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: KVTransfer parameters used for disaggregated serving.
          title: Kv Transfer Params
        vllm_xargs:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - items:
                      anyOf:
                        - type: string
                        - type: integer
                        - type: number
                    type: array
              type: object
            - type: 'null'
          default: null
          description: >-
            Additional request parameters with (list of) string or numeric
            values, used by custom extensions.
          title: Vllm Xargs
        repetition_detection:
          anyOf:
            - $ref: '#/components/schemas/RepetitionDetectionParams'
            - type: 'null'
          default: null
          description: >-
            Parameters for detecting repetitive N-gram patterns in output
            tokens. If such repetition is detected, generation ends early.
      required:
        - messages
      title: ChatCompletionRequest
      type: object
    ChatCompletionResponse:
      additionalProperties: true
      properties:
        id:
          type: string
          title: Id
        object:
          const: chat.completion
          default: chat.completion
          title: Object
          type: string
        created:
          type: integer
          title: Created
        model:
          title: Model
          type: string
        choices:
          items:
            $ref: '#/components/schemas/ChatCompletionResponseChoice'
          title: Choices
          type: array
        service_tier:
          anyOf:
            - enum:
                - auto
                - default
                - flex
                - scale
                - priority
              type: string
            - type: 'null'
          default: null
          title: Service Tier
        system_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: System Fingerprint
        usage:
          $ref: '#/components/schemas/UsageInfo'
        prompt_logprobs:
          anyOf:
            - items:
                anyOf:
                  - additionalProperties: true
                    type: object
                  - type: 'null'
              type: array
            - type: 'null'
          default: null
          title: Prompt Logprobs
        prompt_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Prompt Token Ids
        prompt_text:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Prompt Text
        kv_transfer_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Kv Transfer Params
        metrics:
          anyOf:
            - $ref: '#/components/schemas/PerRequestTimingMetrics'
            - type: 'null'
          default: null
      required:
        - id
        - created
        - model
        - choices
        - usage
      title: ChatCompletionResponse
      type: object
    ChatCompletionStreamResponse:
      additionalProperties: true
      properties:
        id:
          type: string
          title: Id
        object:
          const: chat.completion.chunk
          default: chat.completion.chunk
          title: Object
          type: string
        created:
          type: integer
          title: Created
        model:
          title: Model
          type: string
        choices:
          items:
            $ref: '#/components/schemas/ChatCompletionResponseStreamChoice'
          title: Choices
          type: array
        usage:
          anyOf:
            - $ref: '#/components/schemas/UsageInfo'
            - type: 'null'
          default: null
        system_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: System Fingerprint
        prompt_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Prompt Token Ids
        prompt_text:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Prompt Text
        metrics:
          anyOf:
            - $ref: '#/components/schemas/PerRequestTimingMetrics'
            - type: 'null'
          default: null
      required:
        - id
        - created
        - model
        - choices
      title: ChatCompletionStreamResponse
      type: object
    ChatCompletionMessageParam:
      additionalProperties: true
      description: >-
        A single chat message.


        Simplified projection of vLLM's `ChatCompletionMessageParam` union.
        Extra

        fields are permitted, so anything the upstream engine accepts still
        passes

        through -- this shape exists to keep the rendered schema readable.
      properties:
        role:
          enum:
            - system
            - developer
            - user
            - assistant
            - tool
          title: Role
          type: string
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ContentPartText'
                  - $ref: '#/components/schemas/ContentPartImage'
                  - $ref: '#/components/schemas/ContentPartAudio'
                  - $ref: '#/components/schemas/ContentPartVideo'
              type: array
            - type: 'null'
          default: null
          title: Content
        name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Name
        tool_calls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolCall'
              type: array
            - type: 'null'
          default: null
          title: Tool Calls
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Tool Call Id
      required:
        - role
      title: ChatCompletionMessageParam
      type: object
    ResponseFormat:
      additionalProperties: true
      properties:
        type:
          enum:
            - text
            - json_object
            - json_schema
          title: Type
          type: string
        json_schema:
          anyOf:
            - $ref: '#/components/schemas/JsonSchemaResponseFormat'
            - type: 'null'
          default: null
      required:
        - type
      title: ResponseFormat
      type: object
    StructuralTagResponseFormat:
      additionalProperties: true
      properties:
        type:
          const: structural_tag
          title: Type
          type: string
        format:
          title: Format
      required:
        - type
        - format
      title: StructuralTagResponseFormat
      type: object
    LegacyStructuralTagResponseFormat:
      additionalProperties: true
      properties:
        type:
          const: structural_tag
          title: Type
          type: string
        structures:
          items:
            $ref: '#/components/schemas/LegacyStructuralTag'
          title: Structures
          type: array
        triggers:
          items:
            type: string
          title: Triggers
          type: array
      required:
        - type
        - structures
        - triggers
      title: LegacyStructuralTagResponseFormat
      type: object
    StreamOptions:
      additionalProperties: true
      properties:
        include_usage:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Include Usage
        continuous_usage_stats:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Continuous Usage Stats
      title: StreamOptions
      type: object
    ChatCompletionToolsParam:
      additionalProperties: true
      properties:
        type:
          type: string
          const: function
          title: Type
          default: function
        function:
          $ref: '#/components/schemas/FunctionDefinition'
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Defer Loading
      required:
        - function
      title: ChatCompletionToolsParam
      type: object
    ChatCompletionNamedToolChoiceParam:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/ChatCompletionNamedFunction'
        type:
          type: string
          const: function
          title: Type
          default: function
      required:
        - function
      title: ChatCompletionNamedToolChoiceParam
      type: object
    StructuredOutputsParams:
      additionalProperties: true
      description: Structured-output constraints. Exactly one constraint may be set.
      properties:
        json:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Json
        regex:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Regex
        choice:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Choice
        grammar:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Grammar
        json_object:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Json Object
        disable_any_whitespace:
          default: false
          title: Disable Any Whitespace
          type: boolean
        disable_additional_properties:
          default: false
          title: Disable Additional Properties
          type: boolean
        whitespace_pattern:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Whitespace Pattern
        structural_tag:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Structural Tag
      title: StructuredOutputsParams
      type: object
    RepetitionDetectionParams:
      additionalProperties: true
      description: Parameters for detecting repetitive N-gram patterns in output tokens.
      properties:
        max_pattern_size:
          default: 0
          description: >-
            Maximum size of N-gram pattern to detect for sequence repetition.
            Set to 0 to disable. Must be used together with min_count.
          title: Max Pattern Size
          type: integer
        min_pattern_size:
          default: 0
          description: >-
            Minimum N-gram pattern size to check for sequence repetition. If set
            to 0, it defaults to 1. Must be <= max_pattern_size.
          title: Min Pattern Size
          type: integer
        min_count:
          default: 0
          description: >-
            Minimum number of times an N-gram pattern must repeat to trigger
            detection. Must be >= 2.
          title: Min Count
          type: integer
      title: RepetitionDetectionParams
      type: object
    ChatCompletionResponseChoice:
      additionalProperties: true
      properties:
        index:
          type: integer
          title: Index
        message:
          $ref: '#/components/schemas/ChatMessage'
        logprobs:
          anyOf:
            - $ref: '#/components/schemas/ChatCompletionLogProbs'
            - type: 'null'
          default: null
        finish_reason:
          anyOf:
            - type: string
            - type: 'null'
          default: stop
          title: Finish Reason
        stop_reason:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          default: null
          title: Stop Reason
        token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Token Ids
      required:
        - index
        - message
      title: ChatCompletionResponseChoice
      type: object
    UsageInfo:
      additionalProperties: true
      properties:
        prompt_tokens:
          default: 0
          title: Prompt Tokens
          type: integer
        total_tokens:
          default: 0
          title: Total Tokens
          type: integer
        completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Completion Tokens
        prompt_tokens_details:
          anyOf:
            - $ref: '#/components/schemas/PromptTokenUsageInfo'
            - type: 'null'
          default: null
      title: UsageInfo
      type: object
    PerRequestTimingMetrics:
      additionalProperties: true
      properties:
        time_to_first_token_ms:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Time To First Token Ms
        generation_time_ms:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Generation Time Ms
        queue_time_ms:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Queue Time Ms
        mean_itl_ms:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Mean Itl Ms
        tokens_per_second:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Tokens Per Second
      title: PerRequestTimingMetrics
      type: object
    ChatCompletionResponseStreamChoice:
      additionalProperties: true
      properties:
        index:
          type: integer
          title: Index
        delta:
          $ref: '#/components/schemas/DeltaMessage'
        logprobs:
          anyOf:
            - $ref: '#/components/schemas/ChatCompletionLogProbs'
            - type: 'null'
          default: null
        finish_reason:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Finish Reason
        stop_reason:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          default: null
          title: Stop Reason
        token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Token Ids
      required:
        - index
        - delta
      title: ChatCompletionResponseStreamChoice
      type: object
    ContentPartText:
      additionalProperties: true
      properties:
        type:
          const: text
          default: text
          title: Type
          type: string
        text:
          title: Text
          type: string
      required:
        - text
      title: ContentPartText
      type: object
    ContentPartImage:
      additionalProperties: true
      properties:
        type:
          const: image_url
          default: image_url
          title: Type
          type: string
        image_url:
          $ref: '#/components/schemas/ImageURL'
      required:
        - image_url
      title: ContentPartImage
      type: object
    ContentPartAudio:
      additionalProperties: true
      properties:
        type:
          const: input_audio
          default: input_audio
          title: Type
          type: string
        input_audio:
          $ref: '#/components/schemas/InputAudio'
      required:
        - input_audio
      title: ContentPartAudio
      type: object
    ContentPartVideo:
      additionalProperties: true
      properties:
        type:
          const: video_url
          default: video_url
          title: Type
          type: string
        video_url:
          $ref: '#/components/schemas/VideoURL'
      required:
        - video_url
      title: ContentPartVideo
      type: object
    ToolCall:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: function
          title: Type
          default: function
        function:
          $ref: '#/components/schemas/FunctionCall'
      additionalProperties: true
      type: object
      required:
        - id
        - function
      title: ToolCall
    JsonSchemaResponseFormat:
      additionalProperties: true
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Description
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Schema
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Strict
      required:
        - name
      title: JsonSchemaResponseFormat
      type: object
    LegacyStructuralTag:
      additionalProperties: true
      properties:
        begin:
          title: Begin
          type: string
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Schema
        end:
          title: End
          type: string
      required:
        - begin
        - end
      title: LegacyStructuralTag
      type: object
    FunctionDefinition:
      additionalProperties: true
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Description
        parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Parameters
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Strict
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Defer Loading
      required:
        - name
      title: FunctionDefinition
      type: object
    ChatCompletionNamedFunction:
      additionalProperties: true
      properties:
        name:
          type: string
          title: Name
      required:
        - name
      title: ChatCompletionNamedFunction
      type: object
    ChatMessage:
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
        content:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Content
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Refusal
        function_call:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall'
            - type: 'null'
          default: null
        tool_calls:
          items:
            $ref: '#/components/schemas/ToolCall'
          title: Tool Calls
          type: array
        reasoning:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Reasoning
      required:
        - role
      title: ChatMessage
      type: object
    ChatCompletionLogProbs:
      additionalProperties: true
      properties:
        content:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionLogProbsContent'
              type: array
            - type: 'null'
          default: null
          title: Content
      title: ChatCompletionLogProbs
      type: object
    PromptTokenUsageInfo:
      additionalProperties: true
      properties:
        cached_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Cached Tokens
        created_cache_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Created Cache Tokens
        multimodal_tokens:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          default: null
          description: >-
            Prompt tokens contributed by each input modality, keyed by modality
            name (e.g. `image`, `audio`, `video`). A breakdown of the multimodal
            placeholder tokens already counted in `prompt_tokens`; null when the
            request has no multimodal input.
          title: Multimodal Tokens
      title: PromptTokenUsageInfo
      type: object
    DeltaMessage:
      additionalProperties: true
      properties:
        role:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Role
        content:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Content
        reasoning:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Reasoning
        tool_calls:
          items:
            $ref: '#/components/schemas/DeltaToolCall'
          title: Tool Calls
          type: array
      title: DeltaMessage
      type: object
    ImageURL:
      additionalProperties: true
      properties:
        url:
          description: Either an http(s) URL or a `data:image/...;base64,...` URI.
          title: Url
          type: string
        detail:
          anyOf:
            - enum:
                - auto
                - low
                - high
              type: string
            - type: 'null'
          default: auto
          title: Detail
      required:
        - url
      title: ImageURL
      type: object
    InputAudio:
      additionalProperties: true
      properties:
        data:
          description: Base64-encoded audio bytes.
          title: Data
          type: string
        format:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: e.g. `wav`, `mp3`.
          title: Format
      required:
        - data
      title: InputAudio
      type: object
    VideoURL:
      additionalProperties: true
      properties:
        url:
          title: Url
          type: string
      required:
        - url
      title: VideoURL
      type: object
    FunctionCall:
      properties:
        name:
          type: string
          title: Name
        arguments:
          type: string
          title: Arguments
      additionalProperties: true
      type: object
      required:
        - name
        - arguments
      title: FunctionCall
    ChatCompletionLogProbsContent:
      additionalProperties: true
      properties:
        token:
          title: Token
          type: string
        logprob:
          default: -9999
          title: Logprob
          type: number
        bytes:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Bytes
        top_logprobs:
          items:
            $ref: '#/components/schemas/ChatCompletionLogProb'
          title: Top Logprobs
          type: array
      required:
        - token
      title: ChatCompletionLogProbsContent
      type: object
    DeltaToolCall:
      additionalProperties: true
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Id
        type:
          anyOf:
            - const: function
              type: string
            - type: 'null'
          default: null
          title: Type
        index:
          type: integer
          title: Index
        function:
          anyOf:
            - $ref: '#/components/schemas/DeltaFunctionCall'
            - type: 'null'
          default: null
      required:
        - index
      title: DeltaToolCall
      type: object
    ChatCompletionLogProb:
      additionalProperties: true
      properties:
        token:
          title: Token
          type: string
        logprob:
          default: -9999
          title: Logprob
          type: number
        bytes:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Bytes
      required:
        - token
      title: ChatCompletionLogProb
      type: object
    DeltaFunctionCall:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Name
        arguments:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Arguments
      title: DeltaFunctionCall
      type: object
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Your Seekr API key, sent in the Authorization header with no 'Bearer'
        prefix.
      in: header
      name: Authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.