openapi: 3.1.1
info:
  title: SambaNova cloud API
  description: SambaNova cloud API Specification
  version: 1.1.0
  termsOfService: https://sambanova.ai/cloud-end-user-license-agreement
  contact:
    email: info@sambanova.ai
    name: SambaNova information
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
externalDocs:
  description: Find out more in the official SambaNova docs
  url: https://docs.sambanova.ai/docs/en/api-reference/overview
servers:
  - url: https://api.sambanova.ai/v1
components:
  securitySchemes:
    api_key:
      type: http
      description: SambaNova API Key
      scheme: bearer
      bearerFormat: apiKey
  schemas:
    ModelOutputError:
      title: ModelOutputError
      type: object
      description: error in model output generation
      properties:
        error:
          type: object
          properties:
            code:
              title: code
              type: string
              description: error code
              nullable: true
            message:
              title: message
              type: string
              description: error message
            model_output:
              title: model_output
              type: string
              description: raw output with errors generated by the model
              x-stainless-naming:
                python:
                  property_name: raw_output
            param:
              title: param
              type: string
              description: error params
              nullable: true
            type:
              title: type
              type: string
              description: error type
      required:
        - error
    GeneralError:
      title: GeneralError
      type: object
      description: other kind of errors
      properties:
        error:
          type: object
          properties:
            code:
              title: code
              type: string
              description: error code
              nullable: true
            message:
              title: message
              type: string
              description: error message
            param:
              title: param
              type: string
              description: error params
              nullable: true
            type:
              title: type
              type: string
              description: error type
            error_model_output:
              title: Error Model Output
              type: string
              description: >-
                Raw model output that could not be parsed. Present on
                `server_error` responses when the model produced output that
                failed internal parsing (e.g. a malformed tool call JSON).
              nullable: true
        request_id:
          title: request_id
          type: string
          description: unique request identifier for debugging
          nullable: true
      required:
        - error
    SimpleError:
      title: SimpleError
      type: object
      description: other kind of simple schema errors
      properties:
        error:
          title: error
          type: string
          description: error detail.
          nullable: true
      required:
        - error
    TextContent:
      title: Text Content
      type: object
      additionalProperties: true
      properties:
        type:
          title: Type
          type: string
          description: type of content to send. in this case `text`.
          enum:
            - text
          const: text
        text:
          title: Text
          type: string
          description: string content of the message
      required:
        - type
        - text
    ImageContent:
      title: Image Content
      type: object
      additionalProperties: true
      properties:
        type:
          title: Type
          type: string
          description: type of content to send. in this case `image_url`.
          enum:
            - image_url
          const: image_url
        image_url:
          title: Image Url
          type: object
          properties:
            url:
              title: Url
              type: string
              description: >-
                Either a URL of the image or the base64 encoded image data. 
                currently only base64 encoded image supported
      required:
        - type
        - image_url
    AudioContent:
      title: Audio Content
      type: object
      additionalProperties: true
      properties:
        type:
          title: Type
          type: string
          description: type of content to send. in this case `audio_content`.
          enum:
            - audio_content
          const: audio_content
        audio_content:
          title: Audio Content
          type: object
          properties:
            content:
              title: Content
              type: string
              description: the base64 encoded audio data.
      required:
        - type
        - audio_content
    JSONSchema:
      title: JSONSchema
      type: object
      additionalProperties: true
      description: >-
        A JSON Schema definition the model's structured output. Follows standard
        JSON Schema syntax.
      properties:
        description:
          type: string
          title: Description
          description: description the json schema
          nullable: true
        name:
          title: Name
          type: string
          description: name of the object schema
        schema:
          type: object
          title: Schema
          description: Actual json schema object
          nullable: true
        strict:
          type: boolean
          title: Strict
          description: whether or not to do an strict validation of the schema
          nullable: true
          default: false
      required:
        - name
    ResponseFormatJSONObject:
      title: ResponseFormatJSONObject
      type: object
      description: Specifies that the model should produce output as a raw JSON object.
      additionalProperties: true
      properties:
        type:
          const: json_object
          enum:
            - json_object
          title: Type
          type: string
      required:
        - type
      example:
        type: json_object
    ResponseFormatJSONSchema:
      title: ResponseFormatJSONSchema
      type: object
      additionalProperties: true
      description: >-
        Specifies that the model should produce output conforming to a given
        JSON schema.
      properties:
        json_schema:
          $ref: '#/components/schemas/JSONSchema'
        type:
          const: json_schema
          enum:
            - json_schema
          title: Type
          type: string
      required:
        - json_schema
        - type
      example:
        type: json_schema
        json_schema:
          name: User
          description: JSON schema for a simple user object
          strict: false
          schema:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the user
              name:
                type: string
                description: Full name of the user
            required:
              - id
              - name
    ResponseFormatText:
      title: ResponseFormatText
      type: object
      description: >-
        Specifies that the model should produce output as plain text. This value
        is not supported yet in the chat compeltions api, if this behavior is
        desired do not set response format.
      additionalProperties: true
      properties:
        type:
          const: text
          enum:
            - text
          title: Type
          type: string
      required:
        - type
    FunctionParameters:
      title: Function Parameters
      type: object
      additionalProperties: true
      description: >-
        The parameters the functions accepts, described as a JSON Schema object.
        see the [JSON Schema
        reference](https://json-schema.org/understanding-json-schema/) for
        documentation about the format.  Omitting `parameters` defines a
        function with an empty parameter list.
    FunctionObject:
      title: Function Object
      additionalProperties: true
      type: object
      properties:
        name:
          title: Name
          type: string
          description: >-
            The name of the function to be called. Must be a-z, A-Z, 0-9, or
            contain underscores and dashes.
        description:
          title: Description
          type: string
          description: >-
            A description of what the function does, used by the model to choose
            when and how to call the function.
          nullable: true
        parameters:
          $ref: '#/components/schemas/FunctionParameters'
      required:
        - name
    Tool:
      title: Tool
      type: object
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/FunctionObject'
        type:
          title: Type
          type: string
          description: The type of the tool. Currently, only `function` is supported.
      required:
        - type
        - function
    ToolChoiceObject:
      title: ToolChoiceObject
      type: object
      additionalProperties: true
      properties:
        function:
          title: Function
          type: object
          description: >-
            Specifies a tool the model should use. Use it to force the model to
            call that specific tool.
          additionalProperties: true
          properties:
            name:
              title: Name
              type: string
              description: the name of the tool expected to be used by the model
          required:
            - name
        type:
          type: string
          description: The type of the tool. only `function` is supported.
          enum:
            - function
      required:
        - function
        - type
    AssistantToolCallFunction:
      title: AssistantToolCallFunction
      type: object
      description: The tool that the model called.
      additionalProperties: true
      properties:
        name:
          title: Name
          type: string
          description: The name of the function to call.
        arguments:
          title: Arguments
          type: string
          description: >-
            The arguments to call the function with, as generated by the model
            in JSON format. Note that the model does not always generate valid
            JSON, and may hallucinate parameters not defined by your function
            schema. Validate the arguments in your code before calling your
            function.
      required:
        - name
        - arguments
    AssistantToolCall:
      title: AssistantToolCall
      type: object
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/AssistantToolCallFunction'
        id:
          title: Id
          type: string
          description: ID of the tool call.
        type:
          title: Type
          type: string
          description: type of the tool cal. only `function` is supported.
          enum:
            - function
          const: function
        index:
          title: index
          description: index of tool call chunk only used when using streaming
          type: integer
          nullable: true
      required:
        - id
        - type
        - function
    SystemMessage:
      title: System Message
      type: object
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author, in this case `system`.
          enum:
            - system
          const: system
        content:
          title: Content
          anyOf:
            - type: string
            - title: Text Content Part Array
              type: array
              items:
                $ref: '#/components/schemas/TextContent'
          description: The contents of the system message.
          nullable: true
      required:
        - role
        - content
    UserMessage:
      title: User Message
      type: object
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author, in this case `user`.
          enum:
            - user
          const: user
        content:
          title: Content
          description: The contents of the user message.
          anyOf:
            - type: string
            - title: Multicontent Part Array
              type: array
              items:
                anyOf:
                  - $ref: '#/components/schemas/TextContent'
                  - $ref: '#/components/schemas/ImageContent'
                  - $ref: '#/components/schemas/AudioContent'
          nullable: true
      required:
        - role
        - content
    AssistantMessage:
      title: Assistant Message
      type: object
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author, in this case `assistant`.
          enum:
            - assistant
          const: assistant
        content:
          title: Content
          anyOf:
            - type: string
            - title: Text Content Part Array
              type: array
              items:
                $ref: '#/components/schemas/TextContent'
          description: The contents of the assistant message.
          nullable: true
        reasoning:
          title: Reasoning
          type: string
          description: Reasoning (returned by reasoning models like gpt oss)
          nullable: true
        channel:
          title: Channel
          type: string
          description: Channel (returned by reasoning models like gpt oss)
          nullable: true
        tool_calls:
          title: Tool Calls
          type: array
          items:
            $ref: '#/components/schemas/AssistantToolCall'
          description: The tool calls generated by the model.
          nullable: true
      required:
        - role
        - content
    ToolMessage:
      title: Tool Message
      type: object
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author, in this case `tool`.
          enum:
            - tool
          const: tool
        content:
          title: Content
          description: The contents of the tool message.
          anyOf:
            - type: string
            - title: Text Content Part Array
              type: array
              items:
                $ref: '#/components/schemas/TextContent'
      required:
        - content
        - role
    EnableThinking:
      title: Enable Thinking
      type: boolean
      description: >-
        Enables the model's internal reasoning or "thinking" mode,  if supported
        by the chat template (deepseek models).
      example: true
    ChatCompletionRequest:
      title: Chat Completion Request
      type: object
      description: chat completions request object
      additionalProperties: true
      properties:
        model:
          title: Model
          description: >-
            The model ID to use (e.g. gpt-oss-120b).  See available
            [models](https://docs.sambanova.ai/cloud/docs/get-started/supported-models)
          anyOf:
            - type: string
            - enum:
                - Meta-Llama-3.3-70B-Instruct
                - Meta-Llama-3.2-1B-Instruct
                - Meta-Llama-3.2-3B-Instruct
                - Llama-3.2-11B-Vision-Instruct
                - Llama-3.2-90B-Vision-Instruct
                - Meta-Llama-3.1-8B-Instruct
                - Meta-Llama-3.1-70B-Instruct
                - Meta-Llama-3.1-405B-Instruct
                - Qwen2.5-Coder-32B-Instruct
                - Qwen2.5-72B-Instruct
                - QwQ-32B-Preview
                - Meta-Llama-Guard-3-8B
                - DeepSeek-R1
                - DeepSeek-R1-0528
                - DeepSeek-V3-0324
                - DeepSeek-V3.1
                - DeepSeek-V3.1-cb
                - DeepSeek-V3.1-Terminus
                - DeepSeek-V3.2
                - DeepSeek-R1-Distill-Llama-70B
                - Llama-4-Maverick-17B-128E-Instruct
                - Llama-4-Scout-17B-16E-Instruct
                - Qwen3-32B
                - Qwen3-235B
                - Llama-3.3-Swallow-70B-Instruct-v0.4
                - gpt-oss-120b
                - ALLaM-7B-Instruct-preview
                - MiniMax-M2.5M
                - gemma-3-12b-it
        messages:
          title: Messages
          type: array
          description: A list of messages comprising the conversation so far.
          items:
            anyOf:
              - $ref: '#/components/schemas/SystemMessage'
              - $ref: '#/components/schemas/UserMessage'
              - $ref: '#/components/schemas/AssistantMessage'
              - $ref: '#/components/schemas/ToolMessage'
          minItems: 1
          examples:
            - - role: user
                content: create a poem using palindromes
        max_tokens:
          title: Max Tokens
          type: integer
          description: >-
            The maximum number of tokens that can be generated in the chat
            completion.  The total length of input tokens and generated tokens
            is limited by  the model's context length.
          nullable: true
          example: 2048
        max_completion_tokens:
          title: Max Completion Tokens
          type: integer
          description: >-
            The maximum number of tokens that can be generated in the chat
            completion.  The total length of input tokens and generated tokens
            is limited by  the model's context length.
          nullable: true
          example: 2048
        temperature:
          title: Temperature
          type: number
          description: >-
            What sampling temperature to use, determines the degree of
            randomness in the response.  between 0 and 2, Higher values like 0.8
            will make the output more random,  while lower values like 0.2 will
            make it more focused and deterministic.  Is recommended altering
            this, top_p or top_k but not more than one of these.
          minimum: 0
          maximum: 2
          default: 0.7
          nullable: true
          example: 0.7
        top_p:
          title: Top P
          type: number
          description: >-
            Cumulative probability for token choices. An alternative to sampling
            with temperature, called nucleus sampling, where the model considers
            the results of the tokens with top_p probability mass. So 0.1 means
            only the tokens comprising the top 10% probability mass are
            considered. Is recommended altering this, top_k or temperature but 
            not more than one of these.
          minimum: 0
          maximum: 1
          nullable: true
          example: 1
        top_k:
          title: Top K
          type: integer
          description: >-
            Amount limit of token choices. An alternative to sampling with
            temperature, the model considers the results of the first K tokens
            with higher probability.  So 10 means only the first 10 tokens with
            higher probability are considered. Is recommended altering this,
            top_p or temperature but not more than one of these.
          minimum: 1
          maximum: 100
          nullable: true
          example: 5
        presence_penalty:
          title: Presence Penalty
          type: number
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens
            based on whether they appear in the text so far, increasing the
            model's likelihood to talk about new topics. Not currently
            implemented; accepted for API compatibility
          maximum: 2
          minimum: -2
          default: 0
          nullable: true
        frequency_penalty:
          title: Frequency Penalty
          type: number
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens
            based on their existing frequency in the text so far, decreasing the
            model's likelihood to repeat the same line verbatim. Not currently
            implemented; accepted for API compatibility
          maximum: 2
          minimum: -2
          default: 0
        do_sample:
          title: do_sample
          type: boolean
          description: >-
            If true, sampling is enabled during output generation. If false,
            deterministic decoding is used.
          nullable: true
        stop:
          title: Stop
          description: >-
            Sequences where the API will stop generating tokens. The returned
            text will not contain the stop sequence.
          oneOf:
            - type: string
              example: |+

              nullable: true
            - type: array
              items:
                type: string
                example: '["\n"]'
          nullable: true
        stream:
          title: Stream
          type: boolean
          description: >-
            If set, partial message deltas will be sent. Tokens will be sent as
            data-only  [server-sent
            events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
            as they become available, with the stream terminated by a `data:
            [DONE]` message.
          default: false
          nullable: true
        stream_options:
          title: StreamOptions
          type: object
          description: >-
            Options for streaming response. Only set this when setting stream as
            true
          additionalProperties: true
          properties:
            include_usage:
              anyOf:
                - type: boolean
              title: Include Usage
              description: Whether to include the usage metrics in a final chunk or not
              nullable: true
          nullable: true
        response_format:
          title: Response Format
          description: >-
            An object specifying the format that the model must output.  
            Setting to `{ "type": "json_object"}` enables JSON mode,    which
            will check the message the model generates is valid JSON. 
            **Important:** when using JSON mode, you **must** also instruct the
            model to produce JSON yourself  via a system or user message.
            Setting to `{ "type": "json_schema", "json_schema":
            {<your_schema>}"}` enables JSON schema mode,    which will check the
            message the model generates is valid object of type <your_schema>. 
            Setting to `{ "type": "text"}` is equivalent to the default plain
            text generation
          oneOf:
            - $ref: '#/components/schemas/ResponseFormatJSONSchema'
            - $ref: '#/components/schemas/ResponseFormatJSONObject'
            - $ref: '#/components/schemas/ResponseFormatText'
          discriminator:
            propertyName: type
            mapping:
              json_schema: '#/components/schemas/ResponseFormatJSONSchema'
              json_object: '#/components/schemas/ResponseFormatJSONObject'
              text: '#/components/schemas/ResponseFormatText'
          nullable: true
        reasoning_effort:
          title: Reasoning Effort
          type: string
          description: >-
            Value specifying the amount of reasoning the model is allowed to do,
            increasing it will increase the number of output reasoning tokens
            generated by the model, but will improve quality of the responses.
            allowed values are 'low', 'medium', 'high'
          enum:
            - low
            - medium
            - high
          nullable: true
        tool_choice:
          title: Tool Choice
          description: >-
            Controls which (if any) tool is called by the model.  `none` means
            the model will not call any tool and instead generates a message. 
            `auto` means the model can pick between generating a message or
            calling one or more tools.  `required` means the model must call one
            or more tools.  Specifying a particular tool via `{"type":
            "function", "function": {"name": "my_function"}}` forces  the model
            to call that tool.
          anyOf:
            - enum:
                - none
                - auto
                - required
              type: string
            - $ref: '#/components/schemas/ToolChoiceObject'
          nullable: true
        parallel_tool_calls:
          title: Parallel Tool Calls
          type: boolean
          description: >-
            Whether to enable parallel function calling during tool use, This is
            not yet supported by our models.
          nullable: true
        tools:
          title: tools
          type: array
          description: >-
            A list of tools the model may call.  Use this to provide a list of
            functions the model may generate JSON inputs for.
          items:
            $ref: '#/components/schemas/Tool'
          maxItems: 128
          nullable: true
        chat_template_kwargs:
          title: Chat Template Kwargs
          type: object
          description: >-
            A dictionary of additional keyword arguments to pass into the chat
            template.  Use this to provide extra context or parameters that the
            model's chat template  can process. Keys must be strings; values may
            be any valid JSON type.
          properties:
            enable_thinking:
              $ref: '#/components/schemas/EnableThinking'
          additionalProperties: true
          nullable: true
          example:
            enable_thinking: true
        logprobs:
          title: Logprobs
          type: boolean
          description: >-
            Whether to return log probabilities of the output tokens or not. If
            true, returns the log  probabilities of each output token returned
            in the `content` of `message`.
          default: false
          nullable: true
        top_logprobs:
          title: Top Logprobs
          type: integer
          description: >-
            An integer between 0 and 20 specifying the number of most likely
            tokens to return at each token  position, each with an associated
            log probability. `logprobs` must be set to `true` if this parameter
            is used.
          maximum: 20
          minimum: 0
          nullable: true
        'n':
          title: 'N'
          type: integer
          description: >-
            How many completions to generate for each prompt.

            **Note:** Because this parameter generates many completions, it can
            quickly consume your token quota. Use carefully and ensure that you
            have reasonable settings for `max_tokens`.
          maximum: 8
          minimum: 1
          default: 1
          nullable: true
          example: 1
        logit_bias:
          title: Logit Bias
          type: object
          description: >-
            This is not yet supported by our models.  Modify the likelihood of
            specified tokens appearing in the completion.
          additionalProperties:
            type: integer
          nullable: true
        seed:
          title: Seed
          description: >-
            If specified, our system will make a best effort to sample
            deterministically, such that repeated requests with the same `seed`
            and parameters should return the same result.

            Determinism is not guaranteed, and you should refer to the
            `system_fingerprint` response parameter to monitor changes in the
            backend.
          nullable: true
          type: integer
      required:
        - model
        - messages
      examples:
        - messages:
            - role: user
              content: create a poem using palindromes
          model: gpt-oss-120b
        - messages:
            - role: system
              content: You are a helpful assistant developed by SambaNova systems
            - role: user
              content: create a poem using palindromes
          max_tokens: 2048
          model: gpt-oss-120b
          stream: false
          temperature: 0.7
          top_p: 1
    Usage:
      title: Usage
      type: object
      description: >-
        Usage metrics for the completion, embeddings,transcription or
        translation request
      additionalProperties: true
      properties:
        acceptance_rate:
          title: Acceptance Rate
          type: number
          description: acceptance rate
        completion_tokens:
          title: Completion Tokens
          type: integer
          description: number of tokens generated in completion
        completion_tokens_after_first_per_sec:
          title: Completion Tokens After First Per Sec
          type: number
          description: completion tokens per second after first token generation
        completion_tokens_after_first_per_sec_first_ten:
          title: Completion Tokens After First Per Sec First Ten
          type: number
          description: completion tokens per second after first token generation first ten
        completion_tokens_after_first_per_sec_graph:
          title: Completion Tokens After First Per Sec Graph
          type: number
          description: completion tokens per second after first token generation
        completion_tokens_per_sec:
          title: Completion Tokens Per Sec
          type: number
          description: completion tokens per second
        end_time:
          title: End Time
          type: number
          description: The Unix timestamp (in seconds) of when the generation finished.
        is_last_response:
          title: Is Last Response
          type: boolean
          description: >-
            whether or not is last response, always true for non streaming
            response
          const: true
        prompt_tokens_details:
          title: Prompt tokens details
          type: object
          description: Extra tokens details
          additionalProperties: true
          properties:
            cached_tokens:
              title: Cached tokens
              description: amount of cached tokens
              type: integer
        prompt_tokens:
          title: Prompt Tokens
          type: integer
          description: number of tokens used in the prompt sent
        start_time:
          title: Start Time
          type: number
          description: The Unix timestamp (in seconds) of when the generation started.
        time_to_first_token:
          title: Time To First Token
          type: number
          description: also TTF, time (in seconds) taken to generate the first token
        time_to_first_token_graph:
          title: Time To First Token Graph
          type: number
          description: >-
            Time (in seconds) to first token, adjusted for graph rendering. May
            differ slightly from time_to_first_token.
        stop_reason:
          title: Stop Reason
          type: string
          description: >-
            The reason generation stopped (e.g. "stop", "length"). Mirrors the
            choice-level finish_reason but reported at the usage level.
          nullable: true
        completion_tokens_details:
          title: Completion Tokens Details
          type: object
          description: Breakdown of completion token consumption.
          additionalProperties: true
          properties:
            reasoning_tokens:
              title: Reasoning Tokens
              type: integer
              description: >-
                Number of tokens consumed by the model's internal reasoning
                process. Only present on reasoning-capable models.
          nullable: true
        total_latency:
          title: Total Latency
          type: number
          description: total time (in seconds) taken to generate the full generation
        total_tokens:
          title: Total Tokens
          type: integer
          description: prompt tokens + completion tokens
        total_tokens_per_sec:
          title: Total Tokens Per Sec
          type: number
          description: tokens per second including prompt and completion
      nullable: true
      examples:
        - completion_tokens: 260
          completion_tokens_after_first_per_sec: 422.79282728043336
          completion_tokens_after_first_per_sec_first_ten: 423.6108998455803
          completion_tokens_after_first_per_sec_graph: 423.6108998455803
          completion_tokens_per_sec: 314.53312043711406
          completion_tokens_details:
            reasoning_tokens: 55
          end_time: 1776189309.02061
          is_last_response: true
          prompt_tokens: 90
          prompt_tokens_details:
            cached_tokens: 0
          start_time: 1776189308.193988
          stop_reason: stop
          time_to_first_token: 0.21402883529663086
          time_to_first_token_graph: 0.2102978229522705
          total_latency: 0.8266220092773438
          total_tokens: 350
          total_tokens_per_sec: 423.40996981919204
        - prompt_tokens: 43
          total_tokens: 393
    TopLogProbs:
      title: TopLogProbs
      type: object
      additionalProperties: true
      properties:
        bytes:
          title: Bytes
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
        logprob:
          title: Logprob
          type: number
        token:
          title: Token
          type: string
      required:
        - token
        - logprob
      examples:
        - token: ' Hello'
          logprob: -0.00012340000000000002
          bytes:
            - 32
            - 72
            - 101
            - 108
            - 108
            - 111
        - token: ' Hi'
          logprob: -8.243
          bytes:
            - 32
            - 72
            - 105
    LogProbsContent:
      title: Log Probs Content
      additionalProperties: true
      properties:
        bytes:
          title: Bytes
          anyOf:
            - items:
                type: integer
              type: array
          nullable: true
        logprob:
          title: Logprob
          type: number
        token:
          title: Token
          type: string
        top_logprobs:
          $ref: '#/components/schemas/TopLogProbs'
      required:
        - token
        - logprob
        - top_logprobs
      examples:
        - token: ' Hello'
          logprob: -0.00012340000000000002
          bytes:
            - 32
            - 72
            - 101
            - 108
            - 108
            - 111
          top_logprobs:
            - token: ' Hello'
              logprob: -0.00012340000000000002
              bytes:
                - 32
                - 72
                - 101
                - 108
                - 108
                - 111
            - token: ' Hi'
              logprob: -8.243
              bytes:
                - 32
                - 72
                - 105
    LogProbs:
      title: Completion Log Probs
      type: object
      description: Completion Log Probs object
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/LogProbsContent'
      required:
        - content
      examples:
        - content:
            - token: ' Hello'
              logprob: -0.00012340000000000002
              bytes:
                - 32
                - 72
                - 101
                - 108
                - 108
                - 111
              top_logprobs:
                - token: ' Hello'
                  logprob: -0.00012340000000000002
                  bytes:
                    - 32
                    - 72
                    - 101
                    - 108
                    - 108
                    - 111
                - token: ' Hi'
                  logprob: -8.243
                  bytes:
                    - 32
                    - 72
                    - 105
            - token: '!'
              logprob: -0.0023456
              bytes:
                - 33
              top_logprobs:
                - token: '!'
                  logprob: -0.0023456
                  bytes:
                    - 33
                - token: ','
                  logprob: -6.712
                  bytes:
                    - 44
    CompletionResponseMessage:
      title: Completion Response Message
      type: object
      description: completion response message object
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author
          enum:
            - assistant
            - user
            - system
            - tool
        content:
          title: Content
          type: string
          description: The contents of the assistant message.
          nullable: true
        tool_calls:
          title: Tool Calls
          type: array
          items:
            $ref: '#/components/schemas/AssistantToolCall'
          description: The tool calls generated by the model.
          nullable: true
      required:
        - role
        - content
    ChatCompletionChoice:
      title: Chat Completion Choice
      type: object
      additionalProperties: true
      properties:
        message:
          $ref: '#/components/schemas/CompletionResponseMessage'
        finish_reason:
          title: Finish Reason
          type: string
          description: >-
            The reason the model stopped generating tokens.  Will be `stop` if
            the model hit a natural stop point or a provided stop sequence, 
            `length` if the maximum number of tokens specified in the request
            was reached,  `tool_calls` if the model called a tool.
          enum:
            - stop
            - length
            - tool_calls
        index:
          title: Index
          type: integer
          description: The index of the choice in the list of choices
        logprobs:
          title: Logprobs
          anyOf:
            - $ref: '#/components/schemas/LogProbs'
          description: >-
            Returns the log probability of each generated token, indicating the
            model's confidence.  Setting logprobs=true and top_logprobs (up to
            5) reveals the likelihood of chosen tokens
          nullable: true
      required:
        - finish_reason
        - index
        - message
    ChatCompletionResponse:
      title: Chat Completion Response
      type: object
      description: chat completion response returned by the model
      properties:
        choices:
          title: Choices
          type: array
          items:
            $ref: '#/components/schemas/ChatCompletionChoice'
          minItems: 1
        created:
          title: Created
          type: number
          description: >-
            The Unix timestamp (in seconds) of when the chat completion was
            created.
        id:
          title: Id
          type: string
          description: A unique identifier for the chat completion.
        model:
          title: Model
          description: The model used for the chat completion.
          type: string
        object:
          title: Object
          type: string
          description: The object type, always `chat.completion`.
          enum:
            - chat.completion
          const: chat.completion
        system_fingerprint:
          title: System fingerprint
          type: string
          description: Backend configuration that the model runs with.
        usage:
          $ref: '#/components/schemas/Usage'
      required:
        - choices
        - created
        - id
        - model
        - object
        - system_fingerprint
        - usage
      examples:
        - choices:
            - finish_reason: stop
              index: 0
              message:
                content: >-
                  In madam moon's silver glow,  Aha, a palindrome to know, 
                  Radar spins, a circular tale,  Level heads prevail, without
                  fail.  A man, a plan, a canal, Panama!  Able was I ere I saw
                  Elba,  A Santa at NASA, a curious sight,  Do geese see God, in
                  the pale moonlight?  Mr. Owl ate my metal worm,  Do nine men
                  interpret? Nine men, I nod,  Never odd or even, a palindrome's
                  might,  Madam, in Eden, I'm Adam.  Aibohphobia, a fear to
                  confess,  A palindrome's symmetry, I must address,  Refer, a
                  word that reads the same,  A palindrome's beauty, in its
                  circular game.  In the stillness of the night,  Ava, a
                  palindrome, shining bright,  Hannah, a name that reads the
                  same,  A palindrome's magic, in its circular flame.  Note:
                  Please keep in mind that creating a poem using palindromes can
                  be a challenging task,  and the resulting poem may not be as
                  cohesive or flowing as one that doesn't rely on palindromes. 
                  However, I hope you enjoy the attempt!
                role: assistant
          created: 1737583288.6076705
          id: 83a7809d-e18f-44f9-9ab7-2bc494c6c661
          model: gpt-oss-120b
          object: chat.completion
          system_fingerprint: fastcoe
          usage:
            acceptance_rate: 4.058139324188232
            completion_tokens: 350
            completion_tokens_after_first_per_sec: 248.09314856382406
            completion_tokens_after_first_per_sec_first_ten: 249.67922929952655
            completion_tokens_per_sec: 238.91966176995348
            end_time: 1737583289.7345645
            is_last_response: true
            prompt_tokens: 43
            start_time: 1737583288.264706
            time_to_first_token: 0.06312894821166992
            total_latency: 1.4649275719174653
            total_tokens: 393
            total_tokens_per_sec: 268.27264878740493
        - choices:
            - finish_reason: stop
              index: 0
              message:
                content: Hello! How can I assist you today?
                role: assistant
              logprobs:
                content:
                  - token: ' Hello'
                    logprob: -0.00012340000000000002
                    bytes:
                      - 32
                      - 72
                      - 101
                      - 108
                      - 108
                      - 111
                    top_logprobs:
                      - token: ' Hello'
                        logprob: -0.00012340000000000002
                        bytes:
                          - 32
                          - 72
                          - 101
                          - 108
                          - 108
                          - 111
                      - token: ' Hi'
                        logprob: -8.243
                        bytes:
                          - 32
                          - 72
                          - 105
                  - token: '!'
                    logprob: -0.0023456
                    bytes:
                      - 33
                    top_logprobs:
                      - token: '!'
                        logprob: -0.0023456
                        bytes:
                          - 33
                      - token: ','
                        logprob: -6.712
                        bytes:
                          - 44
          created: 1737583290.1234567
          id: 94b8910e-f29a-55a0-0bc8-3cd505d7d772
          model: gpt-oss-120b
          object: chat.completion
          system_fingerprint: fastcoe
          usage:
            acceptance_rate: 3.5
            completion_tokens: 9
            completion_tokens_after_first_per_sec: 245.3
            completion_tokens_per_sec: 230.1
            end_time: 1737583290.2345679
            is_last_response: true
            prompt_tokens: 15
            start_time: 1737583290.1234567
            time_to_first_token: 0.058
            total_latency: 0.111
            total_tokens: 24
            total_tokens_per_sec: 216.2
    CompletionResponseDelta:
      title: Completion Response Delta
      type: object
      description: completion response delta chunk generated by streamed model responses.
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author
          enum:
            - assistant
            - user
            - system
            - tool
          nullable: true
        content:
          title: Content
          type: string
          description: The contents of the assistant message.
          nullable: true
        reasoning:
          title: Reasoning
          type: string
          description: Reasoning (returned by reasoning models like gpt oss)
          nullable: true
        channel:
          title: Channel
          type: string
          description: Channel (returned by reasoning models like gpt oss)
          nullable: true
        tool_calls:
          title: Tool Calls
          type: array
          items:
            $ref: '#/components/schemas/AssistantToolCall'
          description: The tool calls generated by the model.
          nullable: true
    ChatCompletionChunkChoice:
      title: Chat Completion Chunk Choice
      type: object
      additionalProperties: true
      properties:
        delta:
          $ref: '#/components/schemas/CompletionResponseDelta'
        finish_reason:
          title: Finish Reason
          type: string
          description: >-
            The reason the model stopped generating tokens.  Will be `stop` if
            the model hit a natural stop point or a provided stop sequence, 
            `length` if the maximum number of tokens specified in the request
            was reached,  `tool_calls` if the model called a tool.
          enum:
            - stop
            - length
            - tool_calls
          nullable: true
        index:
          title: Index
          type: integer
          description: The index of the choice in the list of choices
        logprobs:
          title: Logprobs
          anyOf:
            - $ref: '#/components/schemas/LogProbs'
          description: >-
            Returns the log probability of each generated token, indicating the
            model's confidence.  Setting logprobs=true and top_logprobs (up to
            5) reveals the likelihood of chosen tokens
          nullable: true
      required:
        - index
        - delta
    ChatCompletionStreamResponse:
      title: Chat Completion Stream Response
      type: object
      description: streamed chunk of a chat completion response returned by the model
      additionalProperties: true
      properties:
        choices:
          title: Choices
          type: array
          description: A list of chat completion choices.
          items:
            $ref: '#/components/schemas/ChatCompletionChunkChoice'
          minItems: 0
          nullable: true
        created:
          title: Created
          type: number
          description: >-
            The Unix timestamp (in seconds) of when the chat completion was
            created.
        id:
          title: Id
          type: string
          description: A unique identifier for the chat completion.
        model:
          title: Model
          description: The model used for the chat completion.
          type: string
        object:
          title: Object
          type: string
          description: The object type, always `chat.completion.chunk`.
          enum:
            - chat.completion.chunk
          const: chat.completion.chunk
        system_fingerprint:
          title: System fingerprint
          type: string
          description: Backend configuration that the model runs with.
        usage:
          $ref: '#/components/schemas/Usage'
      required:
        - choices
        - created
        - id
        - model
        - object
        - system_fingerprint
      examples:
        - choices:
            - delta:
                role: assistant
                content: ''
              index: 0
              finish_reason: null
              logprobs: null
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices:
            - delta:
                role: assistant
                content: in
              index: 0
              finish_reason: null
              logprobs: null
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices:
            - delta:
                content: ''
              index: 0
              finish_reason: length
              logprobs: null
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices: []
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
          usage:
            acceptance_rate: 3
            completion_tokens: 100
            completion_tokens_after_first_per_sec: 262.2771255106759
            completion_tokens_after_first_per_sec_first_ten: 266.98193514986144
            completion_tokens_after_first_per_sec_graph: 266.98193514986144
            completion_tokens_per_sec: 217.87260449707574
            end_time: 1737642515.9077535
            is_last_response: true
            prompt_tokens: 43
            prompt_tokens_details:
              cached_tokens: 0
            start_time: 1737642515.4458635
            time_to_first_token: 0.0844266414642334
            total_latency: 0.4589838186899821
            total_tokens: 143
            total_tokens_per_sec: 311.55782443081836
        - choices:
            - delta:
                content: ' Hello'
              index: 0
              finish_reason: null
              logprobs:
                content:
                  - token: ' Hello'
                    logprob: -0.00012340000000000002
                    bytes:
                      - 32
                      - 72
                      - 101
                      - 108
                      - 108
                      - 111
                    top_logprobs:
                      - token: ' Hello'
                        logprob: -0.00012340000000000002
                        bytes:
                          - 32
                          - 72
                          - 101
                          - 108
                          - 108
                          - 111
                      - token: ' Hi'
                        logprob: -8.243
                        bytes:
                          - 32
                          - 72
                          - 105
          created: 1737642516.1076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30c
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
    CompletionRequest:
      title: Completion Request
      type: object
      description: completions request object
      additionalProperties: true
      properties:
        model:
          title: Model
          description: >-
            The model ID to use (e.g. gpt-oss-120b).  See available
            [models](https://docs.sambanova.ai/cloud/docs/get-started/supported-models)
          anyOf:
            - type: string
            - enum:
                - Meta-Llama-3.3-70B-Instruct
                - Meta-Llama-3.2-1B-Instruct
                - Meta-Llama-3.2-3B-Instruct
                - Llama-3.2-11B-Vision-Instruct
                - Llama-3.2-90B-Vision-Instruct
                - Meta-Llama-3.1-8B-Instruct
                - Meta-Llama-3.1-70B-Instruct
                - Meta-Llama-3.1-405B-Instruct
                - Qwen2.5-Coder-32B-Instruct
                - Qwen2.5-72B-Instruct
                - QwQ-32B-Preview
                - Meta-Llama-Guard-3-8B
                - DeepSeek-R1
                - DeepSeek-R1-0528
                - DeepSeek-V3-0324
                - DeepSeek-V3.1
                - DeepSeek-V3.1-cb
                - DeepSeek-V3.1-Terminus
                - DeepSeek-V3.2
                - DeepSeek-R1-Distill-Llama-70B
                - Llama-4-Maverick-17B-128E-Instruct
                - Llama-4-Scout-17B-16E-Instruct
                - Qwen3-32B
                - Qwen3-235B
                - Llama-3.3-Swallow-70B-Instruct-v0.4
                - gpt-oss-120b
                - ALLaM-7B-Instruct-preview
                - MiniMax-M2.5M
                - gemma-3-12b-it
        prompt:
          title: Prompt
          type: string
          description: Prompt to send to the model.
          examples:
            - >
              <|begin_of_text|><|start_header_id|>system<|end_header_id|>

              You are a helpful
              assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>

              create a poem using
              palindromes<|eot_id|><|start_header_id|>assistant<|end_header_id|>
        max_tokens:
          title: Max Tokens
          type: integer
          description: >-
            The maximum number of tokens that can be generated in the chat
            completion.  The total length of input tokens and generated tokens
            is limited by  the model's context length.
          nullable: true
          example: 2048
        max_completion_tokens:
          title: Max Completion Tokens
          type: integer
          description: >-
            The maximum number of tokens that can be generated in the chat
            completion.  The total length of input tokens and generated tokens
            is limited by  the model's context length.
          nullable: true
          example: 2048
        temperature:
          title: Temperature
          type: number
          description: >-
            What sampling temperature to use, determines the degree of
            randomness in the response.  between 0 and 2, Higher values like 0.8
            will make the output more random,  while lower values like 0.2 will
            make it more focused and deterministic.  Is recommended altering
            this, top_p or top_k but not more than one of these.
          minimum: 0
          maximum: 2
          default: 0.7
          nullable: true
          example: 0.7
        top_p:
          title: Top P
          type: number
          description: >-
            Cumulative probability for token choices. An alternative to sampling
            with temperature, called nucleus sampling, where the model considers
            the results of the tokens with top_p probability mass. So 0.1 means
            only the tokens comprising the top 10% probability mass are
            considered. Is recommended altering this, top_k or temperature but 
            not more than one of these.
          minimum: 0
          maximum: 1
          nullable: true
          example: 1
        top_k:
          title: Top K
          type: integer
          description: >-
            Amount limit of token choices. An alternative to sampling with
            temperature, the model considers the results of the first K tokens
            with higher probability.  So 10 means only the first 10 tokens with
            higher probability are considered. Is recommended altering this,
            top_p or temperature but not more than one of these.
          minimum: 1
          maximum: 100
          nullable: true
          example: 5
        presence_penalty:
          title: Presence Penalty
          type: number
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens
            based on whether they appear in the text so far, increasing the
            model's likelihood to talk about new topics. Not currently
            implemented; accepted for API compatibility
          maximum: 2
          minimum: -2
          default: 0
          nullable: true
        frequency_penalty:
          title: Frequency Penalty
          type: number
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens
            based on their existing frequency in the text so far, decreasing the
            model's likelihood to repeat the same line verbatim. Not currently
            implemented; accepted for API compatibility
          maximum: 2
          minimum: -2
          default: 0
        do_sample:
          title: do_sample
          type: boolean
          description: >-
            If true, sampling is enabled during output generation. If false,
            deterministic decoding is used.
          nullable: true
        stop:
          title: Stop
          description: >-
            Sequences where the API will stop generating tokens. The returned
            text will not contain the stop sequence.
          oneOf:
            - type: string
              example: |+

              nullable: true
            - type: array
              items:
                type: string
                example: '["\n"]'
          nullable: true
        stream:
          title: Stream
          type: boolean
          description: >-
            If set, partial message deltas will be sent. Tokens will be sent as
            data-only  [server-sent
            events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
            as they become available, with the stream terminated by a `data:
            [DONE]` message.
          default: false
          nullable: true
        stream_options:
          title: StreamOptions
          type: object
          description: >-
            Options for streaming response. Only set this when setting stream as
            true
          additionalProperties: true
          properties:
            include_usage:
              anyOf:
                - type: boolean
              title: Include Usage
              description: Whether to include the usage metrics in a final chunk or not
              nullable: true
          nullable: true
        logprobs:
          title: Logprobs
          type: boolean
          description: >-
            This is not yet supported by our models in completions API. Whether
            to return log probabilities of the output tokens or not. If true,
            returns the log  probabilities of each output token returned in the
            `content` of `message`.
          default: false
          nullable: true
        top_logprobs:
          title: Top Logprobs
          type: integer
          description: >-
            This is not yet supported by our models in completions API. An
            integer between 0 and 20 specifying the number of most likely tokens
            to return at each token  position, each with an associated log
            probability. `logprobs` must be set to `true` if this parameter is
            used.
          maximum: 20
          minimum: 0
          nullable: true
        'n':
          title: 'N'
          type: integer
          description: >-
            How many completions to generate for each prompt.

            **Note:** Because this parameter generates many completions, it can
            quickly consume your token quota. Use carefully and ensure that you
            have reasonable settings for `max_tokens`.
          maximum: 1
          minimum: 1
          default: 1
          nullable: true
          example: 1
        logit_bias:
          title: Logit Bias
          type: object
          description: >-
            This is not yet supported by our models.  Modify the likelihood of
            specified tokens appearing in the completion.
          additionalProperties:
            type: integer
          nullable: true
        seed:
          title: Seed
          description: >-
            If specified, our system will make a best effort to sample
            deterministically, such that repeated requests with the same `seed`
            and parameters should return the same result.

            Determinism is not guaranteed, and you should refer to the
            `system_fingerprint` response parameter to monitor changes in the
            backend.
          nullable: true
          type: integer
      required:
        - model
        - prompt
      examples:
        - prompt: >-
            <|begin_of_text|><|start_header_id|>system<|end_header_id|> You are
            a helpful
            assistant.<|eot_id|><|start_header_id|>user<|end_header_id|> create
            a poem using
            palindromes<|eot_id|><|start_header_id|>assistant<|end_header_id|>
          max_tokens: 2048
          model: gpt-oss-120b
          stream: false
          temperature: 0.7
          top_p: 1
    CompletionChoice:
      title: Completion Choice
      type: object
      additionalProperties: true
      properties:
        message:
          $ref: '#/components/schemas/CompletionResponseMessage'
        text:
          title: Text
          type: string
          description: model response
        finish_reason:
          title: Finish Reason
          type: string
          description: >-
            The reason the model stopped generating tokens.  Will be `stop` if
            the model hit a natural stop point or a provided stop sequence, 
            `length` if the maximum number of tokens specified in the request
            was reached,  `tool_calls` if the model called a tool.
          enum:
            - stop
            - length
            - tool_calls
        index:
          title: Index
          type: integer
          description: The index of the choice in the list of choices
        logprobs:
          title: Logprobs
          anyOf:
            - $ref: '#/components/schemas/LogProbs'
          description: >-
            currently not supported in completions API, always null will be
            returned
          nullable: true
      required:
        - finish_reason
        - index
        - text
    CompletionResponse:
      title: Completion Response
      type: object
      description: ompletion response returned by the model
      properties:
        choices:
          title: Choices
          type: array
          items:
            $ref: '#/components/schemas/CompletionChoice'
          minItems: 1
        created:
          title: Created
          type: number
          description: >-
            The Unix timestamp (in seconds) of when the chat completion was
            created.
        id:
          title: Id
          type: string
          description: A unique identifier for the chat completion.
        model:
          title: Model
          description: The model used for the chat completion.
          type: string
        object:
          title: Object
          type: string
          description: The object type, always `chat.completion`.
          enum:
            - chat.completion
          const: chat.completion
        system_fingerprint:
          title: System fingerprint
          type: string
          description: Backend configuration that the model runs with.
        usage:
          $ref: '#/components/schemas/Usage'
      required:
        - choices
        - created
        - id
        - model
        - object
        - system_fingerprint
        - usage
      examples:
        - choices:
            - finish_reason: stop
              index: 0
              text: >-
                In madam moon's silver glow,  Aha, a palindrome to know,  Radar
                spins, a circular tale,  Level heads prevail, without fail.  A
                man, a plan, a canal, Panama!  Able was I ere I saw Elba,  A
                Santa at NASA, a curious sight,  Do geese see God, in the pale
                moonlight?  Mr. Owl ate my metal worm,  Do nine men interpret?
                Nine men, I nod,  Never odd or even, a palindrome's might, 
                Madam, in Eden, I'm Adam.  Aibohphobia, a fear to confess,  A
                palindrome's symmetry, I must address,  Refer, a word that reads
                the same,  A palindrome's beauty, in its circular game.  In the
                stillness of the night,  Ava, a palindrome, shining bright, 
                Hannah, a name that reads the same,  A palindrome's magic, in
                its circular flame.  Note: Please keep in mind that creating a
                poem using palindromes can be a challenging task,  and the
                resulting poem may not be as cohesive or flowing as one that
                doesn't rely on palindromes.  However, I hope you enjoy the
                attempt!
          created: 1737583288.6076705
          id: 83a7809d-e18f-44f9-9ab7-2bc494c6c661
          model: gpt-oss-120b
          object: chat.completion
          system_fingerprint: fastcoe
          usage:
            acceptance_rate: 4.058139324188232
            completion_tokens: 350
            completion_tokens_after_first_per_sec: 248.09314856382406
            completion_tokens_after_first_per_sec_first_ten: 249.67922929952655
            completion_tokens_per_sec: 238.91966176995348
            end_time: 1737583289.7345645
            is_last_response: true
            prompt_tokens: 43
            start_time: 1737583288.264706
            time_to_first_token: 0.06312894821166992
            total_latency: 1.4649275719174653
            total_tokens: 393
            total_tokens_per_sec: 268.27264878740493
    CompletionChunkChoice:
      title: Completion Chunk Choice
      type: object
      additionalProperties: true
      properties:
        text:
          title: Text
          type: string
          description: model generation response
        finish_reason:
          title: Finish Reason
          type: string
          description: >-
            The reason the model stopped generating tokens.  Will be `stop` if
            the model hit a natural stop point or a provided stop sequence, 
            `length` if the maximum number of tokens specified in the request
            was reached,  `tool_calls` if the model called a tool.
          enum:
            - stop
            - length
          nullable: true
        index:
          title: Index
          type: integer
          description: The index of the choice in the list of choices
        logprobs:
          title: Logprobs
          anyOf:
            - $ref: '#/components/schemas/LogProbs'
          description: >-
            currently not supported in completions API, always null will be
            returned
          nullable: true
      required:
        - text
    CompletionStreamResponse:
      title: Completion Stream Response
      type: object
      description: streamed chunk of a completion response returned by the model
      additionalProperties: true
      properties:
        choices:
          title: Choices
          type: array
          description: A list of chat completion choices.
          items:
            $ref: '#/components/schemas/CompletionChunkChoice'
          minItems: 0
          nullable: true
        created:
          title: Created
          type: number
          description: >-
            The Unix timestamp (in seconds) of when the chat completion was
            created.
        id:
          title: Id
          type: string
          description: A unique identifier for the chat completion.
        model:
          title: Model
          description: The model used for the chat completion.
          type: string
        object:
          title: Object
          type: string
          description: The object type, always `chat.completion.chunk`.
          enum:
            - chat.completion.chunk
          const: chat.completion.chunk
        system_fingerprint:
          title: System fingerprint
          type: string
          description: Backend configuration that the model runs with.
        usage:
          $ref: '#/components/schemas/Usage'
      required:
        - choices
        - created
        - id
        - model
        - object
        - system_fingerprint
      examples:
        - choices:
            - delta:
                role: assistant
                content: ''
              index: 0
              finish_reason: null
              logprobs: null
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices:
            - delta:
                role: assistant
                content: in
              index: 0
              finish_reason: null
              logprobs: null
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices:
            - delta:
                content: ''
              index: 0
              finish_reason: length
              logprobs: null
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices: []
          created: 1737642515.6076705
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: gpt-oss-120b
          object: chat.completion.chunk
          system_fingerprint: fastcoe
          usage:
            acceptance_rate: 3
            completion_tokens: 100
            completion_tokens_after_first_per_sec: 262.2771255106759
            completion_tokens_after_first_per_sec_first_ten: 266.98193514986144
            completion_tokens_after_first_per_sec_graph: 266.98193514986144
            completion_tokens_per_sec: 217.87260449707574
            end_time: 1737642515.9077535
            is_last_response: true
            prompt_tokens: 43
            prompt_tokens_details:
              cached_tokens: 0
            start_time: 1737642515.4458635
            time_to_first_token: 0.0844266414642334
            total_latency: 0.4589838186899821
            total_tokens: 143
            total_tokens_per_sec: 311.55782443081836
    ResponseTool:
      title: Response Tool
      type: object
      description: >-
        A tool definition passed to the model via the tools[] array. Only type
        "function" is supported; other tool types are filtered server-side.
      properties:
        type:
          title: Type
          type: string
          description: The type of tool. Always "function".
          enum:
            - function
        name:
          title: Name
          type: string
          description: The name of the function to be called.
        description:
          title: Description
          type: string
          description: >-
            A description of what the function does. Used by the model to decide
            when and whether to call it.
          nullable: true
        parameters:
          title: Parameters
          type: object
          description: >-
            The parameters the function accepts, described as a JSON Schema
            object. Omit or set to null for functions that take no parameters.
          additionalProperties: true
          nullable: true
        strict:
          title: Strict
          type: boolean
          description: >-
            When true, the model is instructed to generate arguments that
            strictly conform to the provided JSON schema. Not currently enforced
            by SambaNova accepted for API compatibility and echoed back as null
            in the response.
          nullable: true
      required:
        - type
        - name
      example:
        type: function
        name: get_weather
        description: Get the current weather for a given location.
        parameters:
          type: object
          properties:
            location:
              type: string
              description: The city and state, e.g. San Francisco, CA
          required:
            - location
          additionalProperties: false
        strict: null
    ResponseNamedToolChoice:
      title: Response Named Tool Choice
      type: object
      description: >-
        Forces the model to call a specific function. Pass this object as
        tool_choice to guarantee the model will invoke the named function.
      properties:
        type:
          title: Type
          type: string
          description: The type of tool to force. Always "function".
          enum:
            - function
        name:
          title: Name
          type: string
          description: The name of the function to call.
      required:
        - type
        - name
      example:
        type: function
        name: get_weather
    ResponseToolChoiceOption:
      title: Response Tool Choice Option
      description: >-
        Controls which tool (if any) the model calls. String values: "none"
        disables tool calls; "auto" lets the model decide; "required" forces at
        least one tool call. To force a specific function, provide a
        ResponseNamedToolChoice object.
      oneOf:
        - type: string
          title: Tool choice mode
          description: String shorthand for tool selection behavior.
          enum:
            - none
            - auto
            - required
        - $ref: '#/components/schemas/ResponseNamedToolChoice'
    ResponseTextFormatText:
      title: Response Text Format Text
      type: object
      description: >-
        Specifies that the model should produce output as plain text. This is
        the default.
      additionalProperties: false
      properties:
        type:
          title: Type
          type: string
          description: The format type. Always "text".
          enum:
            - text
      required:
        - type
      example:
        type: text
    ResponseTextFormatJSONObject:
      title: Response Text Format JSON Object
      type: object
      description: >-
        Specifies that the model should produce output as a raw JSON object. The
        model is not constrained to any specific schema.
      additionalProperties: false
      properties:
        type:
          title: Type
          type: string
          description: The format type. Always "json_object".
          enum:
            - json_object
      required:
        - type
      example:
        type: json_object
    ResponseTextFormatJSONSchema:
      title: Response Text Format JSON Schema
      type: object
      description: >-
        Specifies that the model should produce structured output conforming to
        the provided JSON Schema. Unlike the Chat Completions API, the Responses
        API places name, schema, strict, and description directly on this object
        (not nested under a json_schema key).
      additionalProperties: false
      properties:
        type:
          title: Type
          type: string
          description: The format type. Always "json_schema".
          enum:
            - json_schema
        name:
          title: Name
          type: string
          description: A name for the schema, used to identify it in the model's output.
        description:
          title: Description
          type: string
          description: An optional description of the schema, used to guide the model.
          nullable: true
        schema:
          title: Schema
          type: object
          description: >-
            A JSON Schema object defining the structure the model's output must
            conform to. Typically includes "type", "properties", "required", and
            optionally "additionalProperties". Must be a valid JSON Schema.
          additionalProperties: true
          nullable: true
        strict:
          title: Strict
          type: boolean
          description: >-
            When true, the model is instructed to produce output that strictly
            matches the schema. Not currently enforced by SambaNova — accepted
            for API compatibility.
          nullable: true
      required:
        - type
        - name
      example:
        type: json_schema
        name: event_extraction
        description: Extract structured event information from text
        strict: false
        schema:
          type: object
          properties:
            title:
              type: string
            date:
              type: string
            time:
              type: string
            location:
              type: string
          required:
            - title
            - date
            - time
            - location
          additionalProperties: false
    ResponseFormatConfiguration:
      title: Response Format Configuration
      description: >-
        Controls the format of the model's output for the Responses API
        text.format field. "text" returns plain text (default). "json_object"
        returns a raw JSON object. "json_schema" enforces structured output
        matching a provided JSON Schema definition (fields are flat — no
        json_schema wrapper key).
      oneOf:
        - $ref: '#/components/schemas/ResponseTextFormatText'
        - $ref: '#/components/schemas/ResponseTextFormatJSONObject'
        - $ref: '#/components/schemas/ResponseTextFormatJSONSchema'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/ResponseTextFormatText'
          json_object: '#/components/schemas/ResponseTextFormatJSONObject'
          json_schema: '#/components/schemas/ResponseTextFormatJSONSchema'
    ResponseUrlCitation:
      title: Response URL Citation
      type: object
      description: >-
        A URL citation annotation on an output text span. Not currently
        implemented by SambaNova — included for OpenAI API compatibility.
      properties:
        type:
          title: Type
          type: string
          description: The annotation type. Always "url_citation".
          enum:
            - url_citation
        url:
          title: URL
          type: string
          description: The URL being cited.
        title:
          title: Title
          type: string
          description: The title of the cited page.
          nullable: true
        start_index:
          title: Start Index
          type: integer
          description: Character offset in the output text where the citation starts.
        end_index:
          title: End Index
          type: integer
          description: Character offset in the output text where the citation ends.
      required:
        - type
        - url
        - start_index
        - end_index
    ResponseFileCitation:
      title: Response File Citation
      type: object
      description: >-
        A file citation annotation on an output text span. Not currently
        implemented by SambaNova — included for OpenAI API compatibility.
      properties:
        type:
          title: Type
          type: string
          description: The annotation type. Always "file_citation".
          enum:
            - file_citation
        file_id:
          title: File ID
          type: string
          description: The ID of the cited file.
        start_index:
          title: Start Index
          type: integer
          description: Character offset in the output text where the citation starts.
        end_index:
          title: End Index
          type: integer
          description: Character offset in the output text where the citation ends.
      required:
        - type
        - file_id
        - start_index
        - end_index
    ResponseAnnotation:
      title: Response Annotation
      description: >-
        An annotation on a span of output text. Currently stubbed for OpenAI API
        compatibility — SambaNova does not produce annotations.
      oneOf:
        - $ref: '#/components/schemas/ResponseUrlCitation'
        - $ref: '#/components/schemas/ResponseFileCitation'
      discriminator:
        propertyName: type
        mapping:
          url_citation: '#/components/schemas/ResponseUrlCitation'
          file_citation: '#/components/schemas/ResponseFileCitation'
    ResponseTextContent:
      title: Response Input Text Content
      type: object
      description: A plain text content part for use inside a ResponseMessage.
      properties:
        type:
          title: Type
          type: string
          description: >-
            The type of this content part. "input_text" for user, developer, and
            system roles,  and output_text for assistant messages.
          enum:
            - input_text
            - output_text
        text:
          title: Text
          type: string
          description: The text content of this part.
        annotations:
          title: Annotations
          type: array
          description: >-
            Annotations on spans of this text part, such as URL or file
            citations. Only present on output_text parts returned by the server.
            Not currently produced by SambaNova — included for OpenAI API
            compatibility.
          items:
            $ref: '#/components/schemas/ResponseAnnotation'
          nullable: true
        logprobs:
          title: Log Probs
          type: array
          description: >-
            Log probability information for the output tokens. Only present on
            output_text parts when `top_logprobs` is set on the request.
          items:
            $ref: '#/components/schemas/LogProbsContent'
          nullable: true
      required:
        - type
        - text
    ResponseImageContent:
      title: Response Image Content
      type: object
      description: >-
        An image content part for use inside a ResponseMessage. Supported in
        input messages (user role). Provide a base64-encoded image as a data
        URL. external URLs not supported.
      properties:
        type:
          title: Type
          type: string
          description: The type of this content part. Always "input_image".
          enum:
            - input_image
        image_url:
          title: Image URL
          type: string
          description: >-
            A base64-encoded image in data URL format or fully qualified URL
            (e.g. "data:image/png;base64,..."). Currently only base64-encoded
            image data is supported.
          nullable: true
        detail:
          title: Detail
          type: string
          description: >-
            The detail level for image processing. "auto" lets the model decide.
            "low" uses a fixed low-res tile. "high" enables high-res tiling.
          enum:
            - auto
            - low
            - high
          default: auto
          nullable: true
      required:
        - type
        - image_url
    ResponseAudioContent:
      title: Response Audio Content
      type: object
      description: >-
        An audio content part for use inside a ResponseMessage. Supported in
        input messages (user role). Provide base64-encoded audio data with the
        format.
      properties:
        type:
          title: Type
          type: string
          description: The type of this content part. Always "input_audio".
          enum:
            - input_audio
        input_audio:
          title: Input Audio
          type: object
          description: The audio data and format.
          properties:
            data:
              title: Data
              type: string
              description: Base64-encoded audio data.
            format:
              title: Format
              type: string
              enum:
                - mp3
                - wav
              description: The format of the audio data.
          required:
            - data
            - format
      required:
        - type
        - input_audio
    ResponseReasoningContent:
      title: Response Reasoning Content
      type: object
      description: >-
        A single content part within a reasoning item's content[]. Contains the
        raw reasoning text produced by the model during its internal thinking
        process.
      properties:
        type:
          title: Type
          type: string
          description: The type of this reasoning content part. Always "reasoning_text".
          enum:
            - reasoning_text
        text:
          title: Text
          type: string
          description: The raw reasoning text generated by the model.
      required:
        - type
        - text
      example:
        type: reasoning_text
        text: >-
          The user is asking about the weather. I should call the get_weather
          function with the location extracted from the message.
    ResponseContent:
      title: Response Content
      description: >-
        A typed content part used in both input and output message content
        arrays. Discriminated by the "type" field.
      oneOf:
        - $ref: '#/components/schemas/ResponseTextContent'
        - $ref: '#/components/schemas/ResponseImageContent'
        - $ref: '#/components/schemas/ResponseAudioContent'
      discriminator:
        propertyName: type
        mapping:
          input_text: '#/components/schemas/ResponseTextContent'
          output_text: '#/components/schemas/ResponseTextContent'
          input_image: '#/components/schemas/ResponseImageContent'
          input_audio: '#/components/schemas/ResponseAudioContent'
    ResponseMessage:
      title: Response Message
      type: object
      description: >-
        A message item. When used as input, id and status are optional. When
        present in output[], id and status are always set by the server.  Role
        "assistant" with content type "output_text" represents a prior model
        turn; user/system/developer turns use content type "input_text". Plain
        string content is accepted in all roles on input.
      properties:
        type:
          title: Type
          type: string
          description: The type of this item. Always "message".
          enum:
            - message
          nullable: true
        id:
          title: ID
          type: string
          description: >-
            Unique identifier for this message item. Always present on output
            items returned by the server. Not required when constructing input
            items.
          nullable: true
        role:
          title: Role
          type: string
          description: >-
            The role of the message. "assistant" is set by the server on output
            items. All four values are valid when constructing input items.
          enum:
            - user
            - assistant
            - system
            - developer
        content:
          title: Content
          description: >-
            The message content. Either a plain text string or an array of typed
            content parts. For assistant turns, array parts use type
            "output_text"; for user/system/developer turns, array parts use type
            "input_text".
          oneOf:
            - type: string
              title: Text content
              description: A plain text message body.
            - type: array
              title: Content part array
              description: An array of typed content parts.
              items:
                $ref: '#/components/schemas/ResponseContent'
        status:
          title: Status
          type: string
          description: >-
            Processing state of this item. Always set on output items returned
            by the server. Not required when constructing input items.
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - role
        - content
      examples:
        - type: message
          role: user
          content: What is the weather in San Francisco?
        - type: message
          role: user
          content:
            - type: input_text
              text: Describe what you see in this image.
        - type: message
          role: assistant
          content:
            - type: output_text
              text: The weather in San Francisco is 65°F and partly cloudy.
        - type: message
          role: system
          content: You are a helpful assistant that provides weather information.
        - type: message
          role: developer
          content: Always respond in JSON format when asked for structured data.
    ResponseFunctionCall:
      title: Response Function Call
      type: object
      description: >-
        A function call item used in both input[] and output[]. When present in
        output[], the model is requesting a tool call — id and status are always
        set by the server. When used in input[], it replays a prior function
        call from the conversation history for multi-turn tool loops.
      properties:
        type:
          title: Type
          type: string
          description: The type of this item. Always "function_call".
          enum:
            - function_call
        id:
          title: ID
          type: string
          description: >-
            Unique identifier for this function call item. Always present on
            output items returned by the server. Required when replaying this
            item in a subsequent input[].
          nullable: true
        call_id:
          title: Call ID
          type: string
          description: >-
            The call ID generated by the model for this tool invocation. Used to
            correlate the function call with its corresponding
            function_call_output result.
        name:
          title: Name
          type: string
          description: The name of the function the model wants to call.
        arguments:
          title: Arguments
          type: string
          description: >-
            A JSON string of the arguments to pass to the function, as generated
            by the model. Validate the arguments in your code before calling the
            function — the model may hallucinate parameters not defined in the
            schema.
        status:
          title: Status
          type: string
          description: >-
            Processing state of this item. Always set on output items returned
            by the server. Not required when constructing input items.
          enum:
            - in_progress
            - completed
            - incomplete
          nullable: true
      required:
        - type
        - call_id
        - name
        - arguments
      example:
        type: function_call
        id: fc_abc123
        call_id: call_abc123
        name: get_weather
        arguments: '{"location":"San Francisco, CA"}'
        status: completed
    ResponseOutputReasoning:
      title: Response Output Reasoning
      type: object
      description: >-
        A reasoning item emitted in output[] by models that expose their
        internal chain-of-thought. Contains the raw reasoning text the model
        produced before generating its final answer.
      properties:
        type:
          title: Type
          type: string
          description: The type of this output item. Always "reasoning".
          enum:
            - reasoning
        id:
          title: ID
          type: string
          description: Unique identifier for this reasoning item, assigned by the server.
          nullable: true
        status:
          title: Status
          type: string
          description: >-
            Processing state of this item. "in_progress" while streaming;
            "completed" when the full reasoning text has been emitted.
          enum:
            - in_progress
            - completed
            - incomplete
          nullable: true
        content:
          title: Content
          type: array
          description: >-
            The reasoning content parts. Each part has type "reasoning_text" and
            carries the raw thinking text. Absent when the item is first added
            (`response.output_item.added`); populated by
            `response.output_item.done`.
          items:
            $ref: '#/components/schemas/ResponseReasoningContent'
          nullable: true
        summary:
          title: Summary
          type: array
          description: >-
            A condensed summary of the reasoning content. Always returned as an
            empty array. Included for OpenAI API compatibility.
          items:
            type: object
            additionalProperties: true
          nullable: true
      required:
        - type
      example:
        type: reasoning
        id: rs_msg_5dc0dc6fca844a20885869634cd3014a
        status: completed
        summary: []
        content:
          - type: reasoning_text
            text: >-
              The user wants weather information for San Francisco. I'll call
              get_weather with location "San Francisco, CA".
    ResponseFunctionCallOutput:
      title: Response Function Call Output
      type: object
      description: >-
        A tool result item used in input[] to return the output of a function
        call back to the model. Always input-only — the model never outputs
        function_call_output items. The call_id must match the id of the
        corresponding ResponseFunctionCall item from the prior model turn.
      properties:
        type:
          title: Type
          type: string
          enum:
            - function_call_output
          description: The type of this item. Always "function_call_output".
        id:
          title: ID
          type: string
          description: Optional identifier for this output item.
          nullable: true
        call_id:
          title: Call ID
          type: string
          description: >-
            The call_id of the ResponseFunctionCall item this result corresponds
            to. Must match exactly.
        output:
          title: Output
          type: string
          description: >-
            A JSON string containing the result of the function call. Returned
            to the model as the tool's response.
        status:
          title: Status
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
          description: Processing state. Optional when constructing input items.
          nullable: true
      required:
        - type
        - call_id
        - output
      example:
        type: function_call_output
        call_id: call_abc123
        output: '{"temperature":"65°F","condition":"partly cloudy"}'
    ResponseInputItem:
      title: Response Input Item
      description: >-
        A single item in the input[] array. Can be a message, a function call, a
        function call result, or a reasoning trace replayed from a prior turn.
        When building multi-turn conversations, pass all items from the previous
        response output[] back as input[] items (including reasoning items) so
        the model has full context. Discriminated by the "type" field.
      oneOf:
        - $ref: '#/components/schemas/ResponseMessage'
        - $ref: '#/components/schemas/ResponseFunctionCall'
        - $ref: '#/components/schemas/ResponseFunctionCallOutput'
        - $ref: '#/components/schemas/ResponseOutputReasoning'
      discriminator:
        propertyName: type
        mapping:
          message: '#/components/schemas/ResponseMessage'
          function_call: '#/components/schemas/ResponseFunctionCall'
          function_call_output: '#/components/schemas/ResponseFunctionCallOutput'
          reasoning: '#/components/schemas/ResponseOutputReasoning'
    ResponseRequest:
      title: Response Request
      type: object
      description: responses request object
      additionalProperties: true
      properties:
        model:
          title: Model
          description: >-
            The model ID to use (e.g. gpt-oss-120b).  See available
            [models](https://docs.sambanova.ai/cloud/docs/get-started/supported-models)
          anyOf:
            - type: string
            - enum:
                - gpt-oss-120b
        input:
          title: Input
          description: >-
            Text input to the model, or a structured list of input items
            representing the full conversation turn. A plain string is
            equivalent to a single user message.
          oneOf:
            - type: string
              title: Text input
              description: A plain text input equivalent to a user-role message.
            - type: array
              title: Input item list
              description: >-
                An ordered list of input items (messages, tool calls, tool
                results, etc.).
              items:
                $ref: '#/components/schemas/ResponseInputItem'
              examples:
                - - role: user
                    content: What is the weather in San Francisco?
                  - role: assistant
                    content:
                      - type: output_text
                        text: >-
                          The weather in San Francisco is 65°F and partly
                          cloudy.
                  - role: user
                    content: What should I wear?
                - - role: user
                    content: What is the weather in San Francisco?
                  - type: function_call
                    id: fc_abc123
                    call_id: call_abc123
                    name: get_weather
                    arguments: '{"location":"San Francisco, CA"}'
                    status: completed
                  - type: function_call_output
                    call_id: call_abc123
                    output: '{"temperature":"65°F","condition":"partly cloudy"}'
        instructions:
          title: Instructions
          type: string
          description: >-
            Inserts a system (or developer) message as the first item in the
            model's context. Equivalent to a system-role message prepended to
            input[].
          nullable: true
        stream:
          title: Stream
          type: boolean
          description: If true, the response is delivered as server-sent events (SSE).
          default: false
          nullable: true
        max_output_tokens:
          title: Max Output Tokens
          type: integer
          description: >-
            Upper bound on the number of tokens the model may generate,
            including visible output tokens and reasoning tokens.
          nullable: true
          example: 1024
        temperature:
          title: Temperature
          type: number
          description: >-
            Controls randomness in generation. Range: 0–2. It is recommended to
            alter this, top_p, or top_k but not more than one at a time.
          minimum: 0
          maximum: 2
          default: 0.7
          nullable: true
          example: 0.7
        top_p:
          title: Top P
          type: number
          description: >-
            Nucleus sampling cutoff. Range: 0–1. It is recommended to alter
            this, temperature, or top_k but not more than one at a time.
          minimum: 0
          maximum: 1
          default: 1
          nullable: true
          example: 1
        top_k:
          title: Top K
          type: integer
          description: >-
            Limits sampling to the top K most probable tokens. It is recommended
            to alter this, top_p, or temperature but not more than one at a
            time.
          minimum: 1
          maximum: 100
          nullable: true
          example: 5
        top_logprobs:
          title: Top Logprobs
          description: >-
            Number of top log-probability entries to return per output token.
            Null means log probabilities are not returned.
          type: integer
          nullable: true
        frequency_penalty:
          title: Frequency Penalty
          type: number
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens
            based on their existing frequency in the text so far, decreasing the
            model's likelihood to repeat the same line verbatim. Not currently
            implemented; accepted for API compatibility and echoed in the
            response.
          minimum: -2
          maximum: 2
          default: 0
          nullable: true
        presence_penalty:
          title: Presence Penalty
          type: number
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens
            based on whether they appear in the text so far, increasing the
            model's likelihood to talk about new topics. Not currently
            implemented; accepted for API compatibility and echoed in the
            response.
          minimum: -2
          maximum: 2
          default: 0
          nullable: true
        tools:
          title: Tools
          type: array
          description: >-
            Tools available to the model. Only type: "function" is supported;
            all other tool types are filtered server-side.
          items:
            $ref: '#/components/schemas/ResponseTool'
          nullable: true
          maxItems: 128
        parallel_tool_calls:
          title: Parallel Tool Calls
          type: boolean
          description: >-
            Whether the model may issue multiple tool calls in parallel within
            one turn.
          default: true
          nullable: true
        max_tool_calls:
          title: Max Tool Calls
          type: integer
          description: >-
            Maximum number of tool calls the model may make in a single response
            turn. Not currently implemented; accepted for API compatibility.
          nullable: true
        tool_choice:
          $ref: '#/components/schemas/ResponseToolChoiceOption'
        text:
          title: Text
          type: object
          description: >-
            Response format configuration. Supports plain text, json_object, and
            json_schema.
          properties:
            format:
              $ref: '#/components/schemas/ResponseFormatConfiguration'
        reasoning:
          title: Reasoning
          type: object
          description: >-
            Reasoning configuration for models that support it. Ignored on
            non-reasoning models.
          properties:
            effort:
              title: Effort
              type: string
              enum:
                - low
                - medium
                - high
              default: medium
              nullable: true
              description: >-
                Reasoning effort level. "low" is faster with less depth; "high"
                is deeper at higher token cost.
          nullable: true
        user:
          title: User
          type: string
          description: 'Included for API compatibility, but only echoed back in response '
          nullable: true
        metadata:
          title: Metadata
          type: object
          description: Included for API compatibility, but not supported
          nullable: true
          additionalProperties:
            type: string
        store:
          title: Store
          type: boolean
          description: >-
            SambaNova is stateless - this field is accepted for API
            compatibility but has no effect. Always echoed back as false.
          default: false
          nullable: true
        truncation:
          title: Truncation
          type: string
          description: >-
            Accepted for API compatibility and echoed in the response. Context
            truncation behavior is not currently configurable via this field in
            SambaNova.
          enum:
            - auto
            - disabled
          default: disabled
          nullable: true
        previous_response_id:
          title: Previous Response ID
          type: string
          description: >-
            Not supported. SambaNova is stateless and does not maintain
            server-side conversation state. Accepted for API compatibility but
            ignored; clients must supply the full conversation history in
            input[].
          nullable: true
        background:
          title: Background
          type: boolean
          description: >-
            Accepted for API compatibility and echoed back in the response. Has
            no effect on server behavior.
          nullable: true
        service_tier:
          title: Service Tier
          type: string
          description: >-
            Accepted for API compatibility and echoed back in the response. Has
            no effect on server behavior.
          nullable: true
      required:
        - model
        - input
    ResponseUsage:
      title: Response Usage
      type: object
      description: Token usage statistics for this response.
      properties:
        input_tokens:
          title: Input Tokens
          type: integer
          description: >-
            Number of tokens in the input, including conversation history and
            any system instructions.
        output_tokens:
          title: Output Tokens
          type: integer
          description: >-
            Number of tokens generated in the output, including visible text and
            any reasoning tokens.
        total_tokens:
          title: Total Tokens
          type: integer
          description: Total tokens consumed by this request (input + output).
        input_tokens_details:
          title: Input Tokens Details
          type: object
          description: Breakdown of input token consumption.
          properties:
            cached_tokens:
              title: Cached Tokens
              type: integer
              description: >-
                Number of input tokens served from the prompt cache. Cached
                tokens are billed at a reduced rate.
          nullable: true
        output_tokens_details:
          title: Output Tokens Details
          type: object
          description: Breakdown of output token consumption.
          properties:
            reasoning_tokens:
              title: Reasoning Tokens
              type: integer
              description: >-
                Number of tokens consumed by the model's internal reasoning
                process. Only present on reasoning-capable models.
          nullable: true
        start_time:
          title: Start Time
          type: number
          description: Unix timestamp (seconds) of when generation started.
          nullable: true
        end_time:
          title: End Time
          type: number
          description: Unix timestamp (seconds) of when generation finished.
          nullable: true
        time_to_first_token:
          title: Time To First Token
          type: number
          description: Time in seconds from request receipt to first output token (TTFT).
          nullable: true
        total_latency:
          title: Total Latency
          type: number
          description: Total time in seconds taken to generate the full response.
          nullable: true
        output_tokens_per_sec:
          title: Output Tokens Per Sec
          type: number
          description: Output token throughput (tokens/second) for this response.
          nullable: true
        output_tokens_after_first_per_sec:
          title: Output Tokens After First Per Sec
          type: number
          description: >-
            Output token throughput measured after the first token was emitted.
            Excludes the time-to-first-token latency from the rate calculation.
          nullable: true
        total_tokens_per_sec:
          title: Total Tokens Per Sec
          type: number
          description: Total token throughput (input + output tokens/second).
          nullable: true
        acceptance_rate:
          title: Acceptance Rate
          type: number
          description: >-
            Speculative decoding acceptance rate. Ratio of draft tokens accepted
            by the verifier model. Higher values indicate better speculation
            efficiency.
          nullable: true
        is_last_response:
          title: Is Last Response
          type: boolean
          description: >-
            Always true for non-streaming responses. For streaming, true only on
            the final chunk that carries usage.
          nullable: true
      required:
        - input_tokens
        - output_tokens
        - total_tokens
      example:
        input_tokens: 248
        output_tokens: 72
        total_tokens: 320
        input_tokens_details:
          cached_tokens: 0
        output_tokens_details:
          reasoning_tokens: 18
        start_time: 1737642515.445
        end_time: 1737642515.904
        time_to_first_token: 0.084
        total_latency: 0.459
        output_tokens_per_sec: 156.8
        output_tokens_after_first_per_sec: 161.2
        total_tokens_per_sec: 311.6
        acceptance_rate: 4.06
        is_last_response: true
    ResponseOutputItem:
      title: Response Output Item
      description: >-
        A single item in the output[] array returned by the model. Can be a
        message (with text or tool call content), a function call request, or a
        reasoning trace. Discriminated by the "type" field.
      oneOf:
        - $ref: '#/components/schemas/ResponseMessage'
        - $ref: '#/components/schemas/ResponseFunctionCall'
        - $ref: '#/components/schemas/ResponseOutputReasoning'
      discriminator:
        propertyName: type
        mapping:
          message: '#/components/schemas/ResponseMessage'
          function_call: '#/components/schemas/ResponseFunctionCall'
          reasoning: '#/components/schemas/ResponseOutputReasoning'
    ResponseResponse:
      title: Response Response
      type: object
      description: >-
        A response object returned by POST /responses (non-streaming). Contains
        the model's output items, echoed input parameters, lifecycle metadata,
        and token usage.
      properties:
        id:
          title: ID
          type: string
          description: Unique identifier for this response.
        object:
          title: Object
          type: string
          description: The object type. Always "response".
          enum:
            - response
        status:
          title: Status
          type: string
          description: >-
            Lifecycle status of the response. "completed" means the model
            finished successfully. "failed" means an error occurred during
            generation. "incomplete" means generation was cut short (e.g.
            max_output_tokens reached).
          enum:
            - completed
            - failed
            - in_progress
            - incomplete
        created_at:
          title: Created At
          type: integer
          description: Unix timestamp (seconds) when the response was created.
        completed_at:
          title: Completed At
          type: integer
          description: Unix timestamp (seconds) when the response finished generating.
          nullable: true
        model:
          title: Model
          type: string
          description: The model ID used to generate this response.
        output:
          title: Output
          type: array
          description: >-
            Ordered array of output items generated by the model. Items may be
            of type "message", "reasoning", or "function_call".
          items:
            $ref: '#/components/schemas/ResponseOutputItem'
        usage:
          $ref: '#/components/schemas/ResponseUsage'
        error:
          title: Error
          type: object
          description: >-
            In-band error object present when status is "failed". Null when the
            response completed successfully.
          properties:
            code:
              title: Code
              type: string
              description: The error code.
            message:
              title: message
              type: string
              description: A human-readable error message.
          nullable: true
          required:
            - code
            - message
        incomplete_details:
          title: Incomplete Details
          type: object
          description: >-
            Present when status is "incomplete". Describes why generation
            stopped before completion (e.g. max_output_tokens reached).
          properties:
            reason:
              type: string
              description: The reason why the response is incomplete.
          nullable: true
        instructions:
          title: Instructions
          type: string
          description: >-
            The system instructions echoed from the request, or null if none
            were provided.
          nullable: true
        temperature:
          title: Temperature
          type: number
          description: The temperature value used for this response.
          nullable: true
        top_p:
          title: Top P
          type: number
          description: The top_p value used for this response.
          nullable: true
        top_k:
          title: Top K
          type: integer
          description: The top_k value used for this response.
          nullable: true
        frequency_penalty:
          title: Frequency Penalty
          type: number
          description: >-
            The frequency_penalty value echoed from the request. Not currently
            implemented; accepted for API compatibility
          nullable: true
        presence_penalty:
          title: Presence Penalty
          type: number
          description: >-
            The presence_penalty value echoed from the request. Not currently
            implemented; accepted for API compatibility
          nullable: true
        tools:
          title: Tools
          type: array
          description: Tool definitions available to the model for this response.
          items:
            $ref: '#/components/schemas/ResponseTool'
        parallel_tool_calls:
          title: Parallel Tool Calls
          type: boolean
          description: Whether parallel tool calls were enabled.
        max_tool_calls:
          title: Max Tool Calls
          type: integer
          description: The max_tool_calls value echoed from the request.
          nullable: true
        tool_choice:
          $ref: '#/components/schemas/ResponseToolChoiceOption'
        text:
          title: Text
          type: object
          description: >-
            The text format configuration (structured output mode) used for this
            response. 
          properties:
            format:
              $ref: '#/components/schemas/ResponseFormatConfiguration'
        reasoning:
          title: Reasoning
          type: object
          description: The reasoning configuration used for this response.
          properties:
            effort:
              title: Effort
              type: string
              description: >-
                The reasoning effort level that was applied for supported
                models.
              enum:
                - low
                - medium
                - high
              nullable: true
            summary:
              title: Summary
              type: string
              description: Not supported.
              nullable: true
          nullable: true
        truncation:
          title: Truncation
          type: string
          description: The truncation value echoed from the request.
          enum:
            - auto
            - disabled
          nullable: true
        background:
          title: Background
          type: boolean
          description: Whether background generation was requested.
          nullable: true
        metadata:
          title: Metadata
          type: object
          description: The metadata echoed from the request.
          nullable: true
          additionalProperties:
            type: string
        max_output_tokens:
          title: Max Output Tokens
          type: integer
          description: The max_output_tokens limit echoed from the request.
          nullable: true
        top_logprobs:
          title: Top Logprobs
          type: integer
          description: The top_logprobs value echoed from the request.
          nullable: true
        previous_response_id:
          title: Previous Response ID
          type: string
          description: >-
            Not supported. Always null. SambaNova is stateless; use input[] to
            supply full conversation history.
          nullable: true
        store:
          title: Store
          type: boolean
          description: >-
            Whether the response was stored server-side. SambaNova is stateless
            - always false.
          nullable: true
        service_tier:
          title: Service Tier
          type: string
          description: >-
            The service tier used to process this request, as reported by the
            server.
          nullable: true
        user:
          title: User
          type: string
          description: The user, echoed back from request.
          nullable: true
      required:
        - id
        - object
        - status
        - created_at
        - model
        - output
        - tools
        - tool_choice
        - truncation
        - parallel_tool_calls
        - background
        - metadata
        - temperature
        - top_p
        - store
        - service_tier
        - error
        - incomplete_details
        - frequency_penalty
        - presence_penalty
        - user
      examples:
        - id: resp_18cb0a9a457241f5b0383ebeee31b80d
          object: response
          created_at: 1775853213
          completed_at: 1775853214
          status: completed
          model: gpt-oss-120b
          output:
            - id: rs_d608e0328e6340a69919f808ee38df6c
              type: reasoning
              status: completed
              summary: []
              content:
                - type: reasoning_text
                  text: >-
                    User wants a three-sentence bedtime story about a unicorn.
                    Provide three sentences, gentle, bedtime. Should be concise.
            - id: msg_c1eb06dccbc64f469533bb51be664a9e
              type: message
              role: assistant
              status: completed
              content:
                - type: output_text
                  annotations: []
                  logprobs: []
                  text: >-
                    Under a moonlit canopy of twinkling stars, a silver-mane
                    unicorn tiptoed into the meadow, leaving a trail of soft,
                    glowing stardust behind each gentle step. She whispered a
                    lullaby to the sleepy flowers, and they swayed in rhythm,
                    their petals folding like tiny blankets around the night. As
                    the world hushed, the unicorn curled around a sleepy child's
                    dream, gifting them a night of sweet, sparkling adventures
                    until sunrise.
          usage:
            input_tokens: 78
            output_tokens: 126
            total_tokens: 204
            input_tokens_details:
              cached_tokens: 0
            output_tokens_details:
              reasoning_tokens: 48
          error: null
          incomplete_details: null
          instructions: null
          metadata: {}
          parallel_tool_calls: true
          tool_choice: auto
          tools: []
          temperature: 1
          top_p: 1
          frequency_penalty: 0
          presence_penalty: 0
          reasoning:
            effort: medium
            summary: null
          text:
            format:
              type: text
          truncation: disabled
          store: false
          background: false
          service_tier: free
          user: null
          previous_response_id: null
        - id: resp_e8e3ad78db7546ce969f79b0828f3be3
          object: response
          created_at: 1775856350
          completed_at: 1775856350
          status: completed
          model: gpt-oss-120b
          output:
            - id: rs_c512ec8087b247b0962b64b7595c92d2
              type: reasoning
              status: completed
              summary: []
              content:
                - type: reasoning_text
                  text: >-
                    User asks: "What is the weather in Bogotá?" Need to fetch
                    current weather using function get_weather. Provide city
                    name "Bogotá". Use function.
            - id: fc_c839dacb61a54c10b6560ad8d161f004
              type: function_call
              call_id: call_e52f086a16c94fa796
              name: get_weather
              arguments: '{"city":"Bogotá"}'
              status: completed
          usage:
            input_tokens: 128
            output_tokens: 59
            total_tokens: 187
            input_tokens_details:
              cached_tokens: 0
            output_tokens_details:
              reasoning_tokens: 43
          error: null
          incomplete_details: null
          instructions: null
          metadata: {}
          parallel_tool_calls: true
          tool_choice: auto
          tools:
            - type: function
              name: get_weather
              description: Get the current weather for a city
              parameters:
                type: object
                properties:
                  city:
                    type: string
                required:
                  - city
              strict: null
          temperature: 1
          top_p: 1
          frequency_penalty: 0
          presence_penalty: 0
          reasoning:
            effort: medium
            summary: null
          text:
            format:
              type: text
          truncation: disabled
          store: false
          background: false
          service_tier: free
          user: null
          previous_response_id: null
        - id: resp_673393d2de28449581eb6190a8168f84
          object: response
          created_at: 1775517028
          completed_at: 1775517028
          status: completed
          model: gpt-oss-120b
          output:
            - id: rs_0c34dec41df941b2bce83e11a7614d31
              type: reasoning
              status: completed
              summary: []
              content:
                - type: reasoning_text
                  text: >-
                    The user wants to extract event info from a sentence. We
                    need to output a JSON in the prescribed format.
            - id: msg_3b1e13019bd84ebcbcf0c15f45f91dfe
              type: message
              role: assistant
              status: completed
              content:
                - type: output_text
                  annotations: []
                  logprobs: []
                  text: |
                    {
                      "title": "SambaNova demo",
                      "date": "2026-04-18",
                      "time": "15:30",
                      "location": "San Francisco"
                    }
          usage:
            input_tokens: 131
            output_tokens: 280
            total_tokens: 411
            input_tokens_details:
              cached_tokens: 0
            output_tokens_details:
              reasoning_tokens: 18
          error: null
          incomplete_details: null
          instructions: null
          metadata: {}
          parallel_tool_calls: true
          tool_choice: auto
          tools: []
          temperature: 1
          top_p: 1
          frequency_penalty: 0
          presence_penalty: 0
          reasoning:
            effort: medium
            summary: null
          text:
            format:
              type: json_schema
              name: event_extraction
              schema:
                type: object
                additionalProperties: false
                properties:
                  title:
                    type: string
                  date:
                    type: string
                  time:
                    type: string
                  location:
                    type: string
                required:
                  - title
                  - date
                  - time
                  - location
          truncation: disabled
          store: false
          background: false
          service_tier: free
          user: null
          previous_response_id: null
    ResponseStreamContentPart:
      title: Response Stream Content Part
      description: >-
        A content part within a streaming event. Discriminated by `type`:
        `output_text` for assistant message content (reuses
        ResponseTextContent), `reasoning_text` for model reasoning (OSS
        extension).
      oneOf:
        - $ref: '#/components/schemas/ResponseTextContent'
        - $ref: '#/components/schemas/ResponseReasoningContent'
      discriminator:
        propertyName: type
        mapping:
          output_text: '#/components/schemas/ResponseTextContent'
          reasoning_text: '#/components/schemas/ResponseReasoningContent'
    ResponseCreatedEvent:
      title: Response Created Event
      type: object
      description: >-
        Emitted as the first SSE event when a streaming response begins. The
        embedded response object has status `in_progress` and an empty `output`
        array. Clients can use this event to capture the response `id` for later
        correlation.
      properties:
        type:
          type: string
          enum:
            - response.created
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response. Starts at 0 for `response.created`.
        response:
          $ref: '#/components/schemas/ResponseResponse'
      required:
        - type
        - sequence_number
        - response
      example:
        type: response.created
        sequence_number: 0
        response:
          id: resp_18cb0a9a457241f5b0383ebeee31b80d
          object: response
          created_at: 1775853213
          status: in_progress
          model: gpt-oss-120b
          output: []
          usage: null
          error: null
          incomplete_details: null
          instructions: null
          metadata: {}
          parallel_tool_calls: true
          tool_choice: auto
          tools: []
          temperature: 1
          top_p: 1
          frequency_penalty: 0
          presence_penalty: 0
          reasoning:
            effort: medium
            summary: null
          text:
            format:
              type: text
          truncation: disabled
          store: false
          background: false
          service_tier: free
    ResponseInProgressEvent:
      title: Response In Progress Event
      type: object
      description: >-
        Emitted when the response transitions to the `in_progress` state,
        immediately after `response.created`. The embedded response object still
        has an empty `output` array; model generation has not yet produced any
        content.
      properties:
        type:
          type: string
          enum:
            - response.in_progress
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        response:
          $ref: '#/components/schemas/ResponseResponse'
      required:
        - type
        - sequence_number
        - response
      example:
        type: response.in_progress
        sequence_number: 1
        response:
          id: resp_18cb0a9a457241f5b0383ebeee31b80d
          object: response
          created_at: 1775853213
          status: in_progress
          model: gpt-oss-120b
          output: []
          usage: null
          error: null
          incomplete_details: null
          instructions: null
          metadata: {}
          parallel_tool_calls: true
          tool_choice: auto
          tools: []
          temperature: 1
          top_p: 1
          frequency_penalty: 0
          presence_penalty: 0
          reasoning:
            effort: medium
            summary: null
          text:
            format:
              type: text
          truncation: disabled
          store: false
          background: false
          service_tier: free
    ResponseOutputItemAddedEvent:
      title: Response Output Item Added Event
      type: object
      description: >-
        Emitted when a new output item (message, function call, or reasoning) is
        added to the response output array. The item has `status: in_progress`
        and may have empty content at this point.
      properties:
        type:
          type: string
          enum:
            - response.output_item.added
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        output_index:
          type: integer
          description: Index of the output item in the response `output` array.
        item:
          $ref: '#/components/schemas/ResponseOutputItem'
      required:
        - type
        - sequence_number
        - output_index
        - item
      examples:
        - type: response.output_item.added
          sequence_number: 2
          output_index: 0
          item:
            id: rs_d608e0328e6340a69919f808ee38df6c
            type: reasoning
            status: in_progress
            summary: []
            content: []
        - type: response.output_item.added
          sequence_number: 8
          output_index: 1
          item:
            id: msg_c1eb06dccbc64f469533bb51be664a9e
            type: message
            role: assistant
            status: in_progress
            content: []
        - type: response.output_item.added
          sequence_number: 8
          output_index: 1
          item:
            id: fc_c839dacb61a54c10b6560ad8d161f004
            type: function_call
            call_id: call_e52f086a16c94fa796
            name: get_weather
            arguments: ''
            status: in_progress
    ResponseContentPartAddedEvent:
      title: Response Content Part Added Event
      type: object
      description: >-
        Emitted when a new content part is added to an output item's content
        array. The part's `text` is empty at this point; subsequent
        `response.output_text.delta` or `response.reasoning_text.delta` events
        carry the incremental content.
      properties:
        type:
          type: string
          enum:
            - response.content_part.added
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the output item to which this content part belongs.
        output_index:
          type: integer
          description: Index of the parent output item in the response `output` array.
        content_index:
          type: integer
          description: Index of this content part within the output item's `content` array.
        part:
          $ref: '#/components/schemas/ResponseStreamContentPart'
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - part
      examples:
        - type: response.content_part.added
          sequence_number: 3
          item_id: rs_d608e0328e6340a69919f808ee38df6c
          output_index: 0
          content_index: 0
          part:
            type: reasoning_text
            text: ''
        - type: response.content_part.added
          sequence_number: 9
          item_id: msg_c1eb06dccbc64f469533bb51be664a9e
          output_index: 1
          content_index: 0
          part:
            type: output_text
            text: ''
            annotations: []
            logprobs: []
    ResponseReasoningTextDeltaEvent:
      title: Response Reasoning Text Delta Event
      type: object
      description: >-
        Emitted for each incremental chunk of reasoning text generated by the
        model. Accumulate `delta` values in order to reconstruct the full
        reasoning text.
      properties:
        type:
          type: string
          enum:
            - response.reasoning_text.delta
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the reasoning output item this delta belongs to.
        output_index:
          type: integer
          description: Index of the reasoning output item in the response `output` array.
        delta:
          type: string
          description: The incremental chunk of reasoning text.
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - delta
      example:
        type: response.reasoning_text.delta
        sequence_number: 4
        item_id: rs_d608e0328e6340a69919f808ee38df6c
        output_index: 0
        delta: >-
          User wants a three-sentence bedtime story about a unicorn. Provide
          three sentences, gentle, bedtime. Should be concise.
    ResponseReasoningTextDoneEvent:
      title: Response Reasoning Text Done Event
      type: object
      description: >-
        Emitted when a reasoning content part has been fully generated. The
        `text` field contains the complete accumulated reasoning text
        (equivalent to concatenating all preceding
        `response.reasoning_text.delta` values). Structural mirror of
        `response.reasoning_text.delta` with `text` instead of `delta`.
      properties:
        type:
          type: string
          enum:
            - response.reasoning_text.done
          x-stainless-const: true
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the reasoning output item this content belongs to.
        output_index:
          type: integer
          description: Index of the reasoning output item in the response `output` array.
        text:
          type: string
          description: The full accumulated reasoning text for this content part.
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - text
      example:
        type: response.reasoning_text.done
        sequence_number: 5
        item_id: rs_d608e0328e6340a69919f808ee38df6c
        output_index: 0
        text: >-
          User wants a three-sentence bedtime story about a unicorn. Provide
          three sentences, gentle, bedtime. Should be concise.
    ResponseOutputTextDeltaEvent:
      title: Response Output Text Delta Event
      type: object
      description: >-
        Emitted for each incremental chunk of assistant message text. Accumulate
        `delta` values in order to reconstruct the full output text.
      properties:
        type:
          type: string
          enum:
            - response.output_text.delta
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the message output item this delta belongs to.
        output_index:
          type: integer
          description: Index of the message output item in the response `output` array.
        content_index:
          type: integer
          description: Index of the content part within the output item's `content` array.
        delta:
          type: string
          description: The incremental chunk of output text.
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/ResponseAnnotation'
          description: Annotations attached to this delta chunk, if any.
        logprobs:
          type: array
          items:
            $ref: '#/components/schemas/LogProbsContent'
          description: >-
            Log probability information for the tokens in this delta, if
            requested.
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - delta
        - annotations
        - logprobs
      example:
        type: response.output_text.delta
        sequence_number: 10
        item_id: msg_c1eb06dccbc64f469533bb51be664a9e
        output_index: 1
        content_index: 0
        delta: >-
          Under a moonlit canopy of twinkling stars, a silver-mane unicorn
          tiptoed into the meadow, leaving a trail of soft
        annotations: []
        logprobs: []
    ResponseOutputTextDoneEvent:
      title: Response Output Text Done Event
      type: object
      description: >-
        Emitted when an output text content part has been fully generated. The
        `text` field contains the complete accumulated output text (equivalent
        to concatenating all preceding `response.output_text.delta` values).
        Structural mirror of `response.output_text.delta` with `text` instead of
        `delta`.
      properties:
        type:
          type: string
          enum:
            - response.output_text.done
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the message output item this content belongs to.
        output_index:
          type: integer
          description: Index of the message output item in the response `output` array.
        content_index:
          type: integer
          description: Index of the content part within the output item's `content` array.
        text:
          type: string
          description: The full accumulated output text for this content part.
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/ResponseAnnotation'
          description: All annotations attached to this text part.
        logprobs:
          type: array
          items:
            $ref: '#/components/schemas/LogProbsContent'
          description: Log probability information for all tokens, if requested.
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - text
        - annotations
        - logprobs
      example:
        type: response.output_text.done
        sequence_number: 15
        item_id: msg_c1eb06dccbc64f469533bb51be664a9e
        output_index: 1
        content_index: 0
        annotations: []
        logprobs: []
        text: >-
          Under a moonlit canopy of twinkling stars, a silver-mane unicorn
          tiptoed into the meadow, leaving a trail of soft, glowing stardust
          behind each gentle step. She whispered a lullaby to the sleepy
          flowers, and they swayed in rhythm, their petals folding like tiny
          blankets around the night. As the world hushed, the unicorn curled
          around a sleepy child's dream, gifting them a night of sweet,
          sparkling adventures until sunrise.
    ResponseContentPartDoneEvent:
      title: Response Content Part Done Event
      type: object
      description: >-
        Emitted when a content part has been fully generated. The `part` field
        contains the complete content for this part (equivalent to the state
        after accumulating all preceding delta events). Structural mirror of
        `response.content_part.added`.
      properties:
        type:
          type: string
          enum:
            - response.content_part.done
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the output item this content part belongs to.
        output_index:
          type: integer
          description: Index of the parent output item in the response `output` array.
        content_index:
          type: integer
          description: Index of this content part within the output item's `content` array.
        part:
          $ref: '#/components/schemas/ResponseStreamContentPart'
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - part
      examples:
        - type: response.content_part.done
          sequence_number: 6
          item_id: rs_d608e0328e6340a69919f808ee38df6c
          output_index: 0
          content_index: 0
          part:
            type: reasoning_text
            text: >-
              User wants a three-sentence bedtime story about a unicorn. Provide
              three sentences, gentle, bedtime. Should be concise.
        - type: response.content_part.done
          sequence_number: 16
          item_id: msg_c1eb06dccbc64f469533bb51be664a9e
          output_index: 1
          content_index: 0
          part:
            type: output_text
            annotations: []
            logprobs: []
            text: >-
              Under a moonlit canopy of twinkling stars, a silver-mane unicorn
              tiptoed into the meadow, leaving a trail of soft, glowing stardust
              behind each gentle step. She whispered a lullaby to the sleepy
              flowers, and they swayed in rhythm, their petals folding like tiny
              blankets around the night. As the world hushed, the unicorn curled
              around a sleepy child's dream, gifting them a night of sweet,
              sparkling adventures until sunrise.
    ResponseFunctionCallArgumentsDeltaEvent:
      title: Response Function Call Arguments Delta Event
      type: object
      description: >-
        Emitted for each incremental chunk of function call arguments JSON
        generated by the model. Accumulate `delta` values in order to
        reconstruct the full arguments string. The accumulated result will be a
        valid JSON string once the corresponding
        `response.function_call_arguments.done` event is received.
      properties:
        type:
          type: string
          enum:
            - response.function_call_arguments.delta
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the function call output item this delta belongs to.
        output_index:
          type: integer
          description: >-
            Index of the function call output item in the response `output`
            array.
        delta:
          type: string
          description: The incremental chunk of the function call arguments JSON string.
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - delta
      example:
        type: response.function_call_arguments.delta
        sequence_number: 9
        item_id: fc_c839dacb61a54c10b6560ad8d161f004
        output_index: 1
        delta: '{"city":"Bogotá"}'
    ResponseFunctionCallArgumentsDoneEvent:
      title: Response Function Call Arguments Done Event
      type: object
      description: >-
        Emitted when a function call's arguments have been fully generated. The
        `arguments` field contains the complete JSON arguments string
        (equivalent to concatenating all preceding
        `response.function_call_arguments.delta` values). Structural mirror of
        `response.function_call_arguments.delta` with `arguments` instead of
        `delta`.
      properties:
        type:
          type: string
          enum:
            - response.function_call_arguments.done
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        item_id:
          type: string
          description: ID of the function call output item.
        output_index:
          type: integer
          description: >-
            Index of the function call output item in the response `output`
            array.
        arguments:
          type: string
          description: The complete JSON arguments string for the function call.
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - arguments
      example:
        type: response.function_call_arguments.done
        sequence_number: 10
        item_id: fc_c839dacb61a54c10b6560ad8d161f004
        output_index: 1
        arguments: '{"city":"Bogotá"}'
    ResponseOutputItemDoneEvent:
      title: Response Output Item Done Event
      type: object
      description: >-
        Emitted when an output item has been fully generated and its status
        transitions to `completed`. The `item` field contains the complete
        output item including all accumulated content. Structural mirror of
        `response.output_item.added`.
      properties:
        type:
          type: string
          enum:
            - response.output_item.done
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        output_index:
          type: integer
          description: Index of the output item in the response `output` array.
        item:
          $ref: '#/components/schemas/ResponseOutputItem'
      required:
        - type
        - sequence_number
        - output_index
        - item
      examples:
        - type: response.output_item.done
          sequence_number: 7
          output_index: 0
          item:
            id: rs_d608e0328e6340a69919f808ee38df6c
            type: reasoning
            status: completed
            summary: []
            content:
              - type: reasoning_text
                text: >-
                  User wants a three-sentence bedtime story about a unicorn.
                  Provide three sentences, gentle, bedtime. Should be concise.
        - type: response.output_item.done
          sequence_number: 17
          output_index: 1
          item:
            id: msg_c1eb06dccbc64f469533bb51be664a9e
            type: message
            role: assistant
            status: completed
            content:
              - type: output_text
                annotations: []
                logprobs: []
                text: >-
                  Under a moonlit canopy of twinkling stars, a silver-mane
                  unicorn tiptoed into the meadow, leaving a trail of soft,
                  glowing stardust behind each gentle step. She whispered a
                  lullaby to the sleepy flowers, and they swayed in rhythm,
                  their petals folding like tiny blankets around the night. As
                  the world hushed, the unicorn curled around a sleepy child's
                  dream, gifting them a night of sweet, sparkling adventures
                  until sunrise.
        - type: response.output_item.done
          sequence_number: 11
          output_index: 1
          item:
            id: fc_c839dacb61a54c10b6560ad8d161f004
            type: function_call
            call_id: call_e52f086a16c94fa796
            name: get_weather
            arguments: '{"city":"Bogotá"}'
            status: completed
    ResponseCompletedEvent:
      title: Response Completed Event
      type: object
      description: >-
        Emitted as the final SSE event when a streaming response has been fully
        generated. The embedded response object has `status: completed`, a fully
        populated `output` array, and a populated `usage` object. Structural
        mirror of `response.created`.
      properties:
        type:
          type: string
          enum:
            - response.completed
          x-stainless-const: true
        sequence_number:
          type: integer
          description: >-
            Monotonically increasing counter for ordering events within a
            streaming response.
        response:
          $ref: '#/components/schemas/ResponseResponse'
      required:
        - type
        - sequence_number
        - response
      examples:
        - type: response.completed
          sequence_number: 18
          response:
            id: resp_18cb0a9a457241f5b0383ebeee31b80d
            object: response
            created_at: 1775853213
            completed_at: 1775853214
            status: completed
            model: gpt-oss-120b
            output:
              - id: rs_d608e0328e6340a69919f808ee38df6c
                type: reasoning
                status: completed
                summary: []
                content:
                  - type: reasoning_text
                    text: >-
                      User wants a three-sentence bedtime story about a unicorn.
                      Provide three sentences, gentle, bedtime. Should be
                      concise.
              - id: msg_c1eb06dccbc64f469533bb51be664a9e
                type: message
                role: assistant
                status: completed
                content:
                  - type: output_text
                    annotations: []
                    logprobs: []
                    text: >-
                      Under a moonlit canopy of twinkling stars, a silver-mane
                      unicorn tiptoed into the meadow, leaving a trail of soft,
                      glowing stardust behind each gentle step.
            usage:
              input_tokens: 78
              output_tokens: 126
              total_tokens: 204
              input_tokens_details:
                cached_tokens: 0
            tool_choice: auto
            tools: []
            temperature: 1
            top_p: 1
            reasoning:
              effort: medium
              summary: null
            text:
              format:
                type: text
        - type: response.completed
          sequence_number: 12
          response:
            id: resp_e8e3ad78db7546ce969f79b0828f3be3
            object: response
            created_at: 1775856350
            completed_at: 1775856350
            status: completed
            model: gpt-oss-120b
            output:
              - id: rs_c512ec8087b247b0962b64b7595c92d2
                type: reasoning
                status: completed
                summary: []
                content:
                  - type: reasoning_text
                    text: >-
                      User asks: "What is the weather in Bogotá?" Need to fetch
                      current weather using function get_weather.
              - id: fc_c839dacb61a54c10b6560ad8d161f004
                type: function_call
                call_id: call_e52f086a16c94fa796
                name: get_weather
                arguments: '{"city":"Bogotá"}'
                status: completed
            usage:
              input_tokens: 128
              output_tokens: 59
              total_tokens: 187
              input_tokens_details:
                cached_tokens: 0
              output_tokens_details:
                reasoning_tokens: 43
            tools:
              - type: function
                name: get_weather
                description: Get the current weather for a city
                parameters:
                  type: object
                  properties:
                    city:
                      type: string
                  required:
                    - city
                strict: null
        - type: response.completed
          sequence_number: 14
          response:
            id: resp_673393d2de28449581eb6190a8168f84
            object: response
            created_at: 1775517028
            completed_at: 1775517028
            status: completed
            model: gpt-oss-120b
            output:
              - id: rs_0c34dec41df941b2bce83e11a7614d31
                type: reasoning
                status: completed
                summary: []
                content:
                  - type: reasoning_text
                    text: >-
                      The user wants to extract event info from a sentence. We
                      need to output a JSON in the prescribed format.
              - id: msg_3b1e13019bd84ebcbcf0c15f45f91dfe
                type: message
                role: assistant
                status: completed
                content:
                  - type: output_text
                    annotations: []
                    logprobs: []
                    text: |
                      {
                        "title": "SambaNova demo",
                        "date": "2026-04-18",
                        "time": "15:30",
                        "location": "San Francisco"
                      }
            usage:
              input_tokens: 131
              output_tokens: 280
              total_tokens: 411
              input_tokens_details:
                cached_tokens: 0
            text:
              format:
                type: json_schema
                name: event_extraction
                schema:
                  type: object
                  additionalProperties: false
                  properties:
                    title:
                      type: string
                    date:
                      type: string
                    time:
                      type: string
                    location:
                      type: string
                  required:
                    - title
                    - date
                    - time
                    - location
    ResponseStreamEvent:
      title: Response Stream Event
      description: >-
        Top-level discriminated union of all Server-Sent Events emitted during a
        streaming `POST /responses` call. Discriminated by the `type` field.
        Events arrive in `sequence_number` order and cover the full lifecycle of
        a response: creation, content generation (text, reasoning, function call
        arguments), and completion.
      oneOf:
        - $ref: '#/components/schemas/ResponseCreatedEvent'
        - $ref: '#/components/schemas/ResponseInProgressEvent'
        - $ref: '#/components/schemas/ResponseOutputItemAddedEvent'
        - $ref: '#/components/schemas/ResponseContentPartAddedEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDoneEvent'
        - $ref: '#/components/schemas/ResponseOutputTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseOutputTextDoneEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent'
        - $ref: '#/components/schemas/ResponseContentPartDoneEvent'
        - $ref: '#/components/schemas/ResponseOutputItemDoneEvent'
        - $ref: '#/components/schemas/ResponseCompletedEvent'
      discriminator:
        propertyName: type
        mapping:
          response.created: '#/components/schemas/ResponseCreatedEvent'
          response.in_progress: '#/components/schemas/ResponseInProgressEvent'
          response.output_item.added: '#/components/schemas/ResponseOutputItemAddedEvent'
          response.content_part.added: '#/components/schemas/ResponseContentPartAddedEvent'
          response.reasoning_text.delta: '#/components/schemas/ResponseReasoningTextDeltaEvent'
          response.reasoning_text.done: '#/components/schemas/ResponseReasoningTextDoneEvent'
          response.output_text.delta: '#/components/schemas/ResponseOutputTextDeltaEvent'
          response.output_text.done: '#/components/schemas/ResponseOutputTextDoneEvent'
          response.function_call_arguments.delta: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent'
          response.function_call_arguments.done: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent'
          response.content_part.done: '#/components/schemas/ResponseContentPartDoneEvent'
          response.output_item.done: '#/components/schemas/ResponseOutputItemDoneEvent'
          response.completed: '#/components/schemas/ResponseCompletedEvent'
    ModelMetadata:
      title: Model Metadata
      type: object
      description: model metadata
      additionalProperties: true
      properties:
        id:
          title: Id
          type: string
          description: model id
        object:
          title: Object
          type: string
          description: type
          const: model
          default: model
          enum:
            - model
        owned_by:
          title: OwnedBy
          type: string
          description: model owner
        context_length:
          title: context length
          type: integer
          description: model context length
        max_completion_tokens:
          title: max completion tokens
          type: integer
          description: model max completion tokens
        sn_metadata:
          title: sn metadata
          type: object
          description: additional sn metadata
        pricing:
          title: pricing
          type: object
          description: pricing details
          additionalProperties: true
          properties:
            prompt:
              title: prompt
              type: number
              description: price per prompt token in USD
            completion:
              title: completion
              type: number
              description: price per completion token in USD
            duration_per_hour:
              title: duration per hour
              type: number
              description: price per input hour
              nullable: true
      required:
        - id
    ModelMetadataList:
      title: Model Metadata List
      type: object
      description: object containing available models and metadata
      additionalProperties: true
      properties:
        data:
          title: Data
          type: array
          description: array of model metadata list
          items:
            $ref: '#/components/schemas/ModelMetadata'
        object:
          title: Object
          type: string
          const: list
          default: list
          enum:
            - list
      required:
        - data
    EmbeddingsRequest:
      title: Embeddings Request
      type: object
      description: embeddings request object
      additionalProperties: true
      properties:
        model:
          title: Model
          description: >-
            The model ID to use See available
            [models](https://docs.sambanova.ai/cloud/docs/get-started/supported-models)
          anyOf:
            - type: string
            - enum:
                - E5-Mistral-7B-Instruct
        input:
          title: input
          description: >-
            Input text to embed. to embed multiple inputs in a single request, 
            pass an array of strings. The input must not exceed the max input
            tokens for the model
          oneOf:
            - type: string
              description: The string that will be turned into an embedding.
            - type: array
              description: The array of strings that will be turned into an embeddings.
              minItems: 1
              items:
                type: string
      required:
        - model
        - input
      example:
        input:
          - text to embed number 1
          - text to embed number 2
        model: E5-Mistral-7B-Instruct
    Embedding:
      type: object
      title: Embedding
      description: Represents an embedding vector returned by embeddings endpoint.
      properties:
        index:
          type: integer
          title: index
          description: The index of the embedding in the list of embeddings.
        object:
          type: string
          title: object
          description: Object type, always embedding.
          enum:
            - embedding
        embedding:
          type: array
          items:
            type: number
          title: embedding
          description: List of floats containing the embedding vector.
          nullable: true
      required:
        - index
        - object
        - embedding
    EmbeddingsResponse:
      title: Embeddings Response
      type: object
      description: Embeddings response returned by the model
      properties:
        object:
          title: object
          type: string
          description: The object type, which is always "list".
          enum:
            - list
        model:
          type: string
          description: The name of the model used to generate the embedding.
        usage:
          $ref: '#/components/schemas/Usage'
        data:
          type: array
          description: The list of embeddings generated by the model.
          items:
            $ref: '#/components/schemas/Embedding'
      required:
        - object
        - model
        - usage
        - data
      example:
        data:
          - index: 0
            object: embedding
            embedding:
              - 0.024864232167601585
              - -0.01452154759317636
              - 0.008880083449184895
          - index: 1
            object: embedding
            embedding:
              - 0.010919672437012196
              - 0.0016351072117686272
              - 0.008019134402275085
        model: E5-Mistral-7B-Instruct
        object: list
        usage:
          prompt_tokens: 716
          total_tokens: 716
    TranscriptionTranslationRequestProperties:
      title: Transcription Translation Request Properties
      type: object
      additionalProperties: true
      properties:
        model:
          title: Model
          description: >-
            The model ID to use See available
            [models](https://docs.sambanova.ai/cloud/docs/get-started/supported-models)
          anyOf:
            - type: string
            - enum:
                - Whisper-Large-v3
        file:
          title: file
          description: >-
            The audio file object to transcribe or translate, in one of these
            formats: FLAC, MP3, MP4, MPEG, MPGA, M4A, Ogg, WAV, or WebM format. 
            File size limit is 25MB.
          type: string
          format: binary
        prompt:
          title: prompt
          description: >-
            Optional text prompt provided to influence transcription Translation
            style or vocabulary. Example: “Please transcribe carefully,
            including pauses and hesitations.”
          type: string
          nullable: true
        language:
          title: language
          description: >-
            Optional language of the input audio.  Supplying the input language
            in ISO-639-1 (e.g. en) format will improve accuracy and latency.
          nullable: true
          type: string
          enum:
            - en
            - zh
            - de
            - es
            - ru
            - ko
            - fr
            - ja
            - pt
            - tr
            - pl
            - ca
            - nl
            - ar
            - sv
            - it
            - id
            - hi
            - fi
            - vi
            - he
            - uk
            - el
            - ms
            - cs
            - ro
            - da
            - hu
            - ta
            - 'no'
            - th
            - ur
            - hr
            - bg
            - lt
            - la
            - mi
            - ml
            - cy
            - sk
            - te
            - fa
            - lv
            - bn
            - sr
            - az
            - sl
            - kn
            - et
            - mk
            - br
            - eu
            - is
            - hy
            - ne
            - mn
            - bs
            - kk
            - sq
            - sw
            - gl
            - mr
            - pa
            - si
            - km
            - sn
            - yo
            - so
            - af
            - oc
            - ka
            - be
            - tg
            - sd
            - gu
            - am
            - yi
            - lo
            - uz
            - fo
            - ht
            - ps
            - tk
            - nn
            - mt
            - sa
            - lb
            - my
            - bo
            - tl
            - mg
            - as
            - tt
            - haw
            - ln
            - ha
            - ba
            - jw
            - su
            - yue
        response_format:
          title: response format
          description: Output format JSON or text.
          type: string
          enum:
            - json
            - text
          default: json
        stream:
          title: stream
          description: Enables streaming responses.
          type: string
          enum:
            - 'true'
            - 'false'
          default: 'false'
          x-stainless-override-schema:
            type: boolean
            default: false
        stream_options:
          title: stream options
          description: Optional settings that apply when `stream` is true.
          type: object
          properties:
            include_usage:
              title: include usage
              description: >-
                If true and `stream` is enabled, optional usage metadata will be
                included in the last streamed response event.
              type: string
              enum:
                - 'true'
                - 'false'
              x-stainless-override-schema:
                type: boolean
              nullable: true
          nullable: true
    TranscriptionRequest:
      type: object
      title: Transcription Request
      description: Transcription request object
      allOf:
        - $ref: '#/components/schemas/TranscriptionTranslationRequestProperties'
      required:
        - model
        - file
      example:
        model: Whisper-Large-v3
        file: (binary audio file, e.g. "sample.wav")
        prompt: Please transcribe carefully, including pauses and hesitations.
        language: es
        response_format: json
        stream: true
        stream_options:
          include_usage: true
    TranslationRequest:
      type: object
      title: Translation Request
      description: Translation request object
      allOf:
        - $ref: '#/components/schemas/TranscriptionTranslationRequestProperties'
      required:
        - model
        - file
      example:
        model: Whisper-Large-v3
        file: (binary audio file, e.g. "sample.wav")
        prompt: Please translate carefully, including pauses and hesitations.
        language: es
        response_format: json
        stream: true
        stream_options:
          include_usage: true
    TranscriptionResponse:
      type: object
      title: Transcription Response
      description: Transcription response json object
      additionalProperties: true
      properties:
        text:
          title: text
          description: audio file text transcription
          type: string
      required:
        - text
      example:
        text: >-
          Es un efecto de sonido de una campana sonando, específicamente una
          campana de iglesia.
    TranslationResponse:
      type: object
      title: Translation Response
      description: Translation response json object
      additionalProperties: true
      properties:
        text:
          title: text
          description: audio file english text translation
          type: string
      required:
        - text
      example:
        text: It's a sound effect of a bell chiming, specifically a church bell.
    TranscriptionTranslationResponseDelta:
      title: Transcription Response Delta
      type: object
      description: >-
        Transcription or translation response delta chunk generated by streamed
        model responses.
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author
          enum:
            - assistant
          const: assistant
          nullable: true
        content:
          title: Content
          type: string
          description: The content delta of the transcription or translation.
          nullable: true
      required:
        - content
    TranscriptionTranslationChunkChoice:
      title: Transcription Translation Chunk Choice
      type: object
      description: >-
        Transcription or translation chunk choice generated by streamed model
        responses.
      additionalProperties: true
      properties:
        delta:
          $ref: '#/components/schemas/TranscriptionTranslationResponseDelta'
        finish_reason:
          title: Finish Reason
          type: string
          description: The reason the model stopped generating tokens
          enum:
            - stop
          nullable: true
        index:
          title: Index
          type: integer
          description: The index of the choice in the list of choices
        logprobs:
          title: Logprobs
          anyOf:
            - $ref: '#/components/schemas/LogProbs'
          description: currently not supported, always null will be returned
          nullable: true
      required:
        - index
        - delta
    TranscriptionTranslationResponseProperties:
      title: Transcription Translation Response Properties
      type: object
      additionalProperties: true
      properties:
        choices:
          title: Choices
          type: array
          description: A list of transcription or translation choices.
          items:
            $ref: '#/components/schemas/TranscriptionTranslationChunkChoice'
          minItems: 0
          nullable: true
        created:
          title: Created
          type: number
          description: >-
            The Unix timestamp (in seconds) of when the chat completion was
            created.
        id:
          title: Id
          type: string
          description: A unique identifier for the chat completion.
        model:
          title: Model
          description: The model used for the chat completion.
          type: string
        object:
          title: Object
          type: string
          description: The object type, always `chat.completion.chunk`.
          enum:
            - chat.completion.chunk
          const: chat.completion.chunk
        system_fingerprint:
          title: System fingerprint
          type: string
          description: Backend configuration that the model runs with.
        usage:
          $ref: '#/components/schemas/Usage'
    TranscriptionStreamResponse:
      type: object
      title: Transcription  Stream Response
      description: streamed chunk of a transcription response returned by the model
      allOf:
        - $ref: '#/components/schemas/TranscriptionTranslationResponseProperties'
      required:
        - choices
        - created
        - id
        - model
        - object
        - system_fingerprint
      examples:
        - choices:
            - delta:
                content: es un sonido
              index: 0
              finish_reason: null
              logprobs: null
          created: 1737642515.3407679
          custom_id: 0
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: Whisper-Large-v3
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices: []
          created: 1737642515.3407679
          custom_id: 0
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: Whisper-Large-v3
          object: chat.completion.chunk
          system_fingerprint: fastcoe
          usage:
            completion_tokens: 100
            completion_tokens_after_first_per_sec: 262.2771255106759
            completion_tokens_after_first_per_sec_first_ten: 266.98193514986144
            completion_tokens_after_first_per_sec_graph: 53.16720674817285
            completion_tokens_per_sec: 217.87260449707574
            end_time: 1737642515.9077535
            is_last_response: true
            prompt_tokens: 43
            start_time: 1737642515.4458635
            time_to_first_token: 0.0844266414642334
            total_latency: 0.4589838186899821
            total_tokens: 143
            total_tokens_per_sec: 311.55782443081836
    TranslationStreamResponse:
      type: object
      title: Translation Stream Response
      description: streamed chunk of a translation response returned by the model
      allOf:
        - $ref: '#/components/schemas/TranscriptionTranslationResponseProperties'
      required:
        - choices
        - created
        - id
        - model
        - object
        - system_fingerprint
      examples:
        - choices:
            - delta:
                content: It's a sound
              index: 0
              finish_reason: null
              logprobs: null
          created: 1737642515.6076705
          custom_id: 0
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: Whisper-Large-v3
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices: []
          created: 1737642515.6076705
          custom_id: 0
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: Whisper-Large-v3
          object: chat.completion.chunk
          system_fingerprint: fastcoe
          usage:
            completion_tokens: 100
            completion_tokens_after_first_per_sec: 262.2771255106759
            completion_tokens_after_first_per_sec_first_ten: 266.98193514986144
            completion_tokens_after_first_per_sec_graph: 53.16720674817285
            completion_tokens_per_sec: 217.87260449707574
            end_time: 1737642515.9077535
            is_last_response: true
            prompt_tokens: 43
            start_time: 1737642515.4458635
            time_to_first_token: 0.0844266414642334
            total_latency: 0.4589838186899821
            total_tokens: 143
            total_tokens_per_sec: 311.55782443081836
paths:
  /chat/completions:
    post:
      operationId: createChatCompletion
      tags:
        - Chat completions
      summary: Create chat-based completion
      security:
        - api_key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
        description: Chat prompt and parameters
        required: true
      responses:
        '200':
          description: >-
            Successful Response, Returns a ChatCompletionResponse object
            (non-streaming), or a stream of server-sent
            ChatCompletionStreamResponse object events ending with a
            response.completed event (when stream: true).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletionResponse'
                  - $ref: '#/components/schemas/ChatCompletionStreamResponse'
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            text/plain:
              schema:
                type: string
                example: 'Invalid request body:  - missing property ''model''"'
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                empty_messages:
                  summary: Empty messages array
                  value:
                    error:
                      message: >-
                        Invalid 'messages': empty array. Expected an array with
                        minimum length 1, but got an empty array instead.
                      type: invalid_request_error
                      param: messages
                      code: empty_array
                    request_id: d79vdot7os633dverihg
                invalid_role:
                  summary: Invalid message role value
                  value:
                    error:
                      message: >-
                        Invalid value: 'developerrr'. Supported values are:
                        'system', 'assistant', 'user', 'function', 'tool', and
                        'developer'.
                      type: invalid_request_error
                      param: messages[0].role
                      code: invalid_value
                    request_id: d79vdit7os6aemenqav0
                null_content:
                  summary: Null user message content
                  value:
                    error:
                      message: >-
                        Invalid value for 'content': expected a string, got
                        null.
                      type: invalid_request_error
                      param: messages.[5].content
                      code: null
                    request_id: d79vcsd7os6aemenqa80
                missing_model:
                  summary: No model parameter provided
                  value:
                    error:
                      message: you must provide a model parameter
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: a4fa849e
                invalid_json:
                  summary: Malformed JSON body
                  value:
                    error:
                      code: null
                      message: >-
                        We could not parse the JSON body of your request. (HINT:
                        This likely means you aren't using your HTTP library
                        correctly. A JSON payload is expected, but what was sent
                        was not valid JSON.)
                      param: null
                      type: invalid_request_error
                    request_id: 3f7db127
                simple:
                  summary: Simple error (unhandled cases)
                  value:
                    error: Unhandled error
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
              examples:
                invalid_api_key:
                  summary: Invalid API key provided
                  value:
                    error:
                      message: >-
                        Incorrect API key provided: *****. You can find your API
                        key at https://cloud.sambanova.ai/apis.
                      type: invalid_request_error
                      param: null
                      code: invalid_api_key
                    request_id: d79vcq57os633dverhi0
                missing_api_key:
                  summary: No API key provided
                  value:
                    error:
                      message: >-
                        You didn't provide an API key. You need to provide your
                        API key in an Authorization header using Bearer auth
                        (i.e. Authorization: Bearer YOUR_KEY).
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: d7a0dct7os633dvesi60
        '404':
          description: Not found - model does not exist or wrong endpoint called
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                model_not_found:
                  summary: Model does not exist or is not accessible
                  value:
                    error:
                      code: model_not_found
                      message: >-
                        The model `abc` does not exist or you do not have access
                        to it.
                      param: model
                      type: invalid_request_error
                    request_id: 887a8227
                simple:
                  summary: Simple error (unhandled cases e.g. wrong endpoint)
                  value:
                    error: Not found
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '410':
          description: Gone - model is no longer available (deprecated or removed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
        '500':
          description: Internal Server Error. Unexpected issue on server side.
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Temporarily Unavailable
          content:
            text/plain:
              schema:
                type: string
                example: Service Temporarily Unavailable
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const completion = await client.chat.completions.create({
              messages: [{ content: 'create a poem using palindromes', role: 'user' }],
              model: 'gpt-oss-120b',
            });

            console.log(completion);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            for completion in client.chat.completions.create(
                messages=[{
                    "content": "create a poem using palindromes",
                    "role": "user",
                }],
                model="gpt-oss-120b",
            ):
              print(completion)
  /completions:
    post:
      operationId: createCompletion
      tags:
        - Completions
      summary: Create completion
      security:
        - api_key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompletionRequest'
        description: text prompt and parameters
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CompletionResponse'
                  - $ref: '#/components/schemas/CompletionStreamResponse'
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            text/plain:
              schema:
                type: string
                example: 'Invalid request body:  - missing property ''model''"'
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                missing_model:
                  summary: No model parameter provided
                  value:
                    error:
                      message: you must provide a model parameter
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: a4fa849e
                invalid_json:
                  summary: Malformed JSON body
                  value:
                    error:
                      code: null
                      message: >-
                        We could not parse the JSON body of your request. (HINT:
                        This likely means you aren't using your HTTP library
                        correctly. A JSON payload is expected, but what was sent
                        was not valid JSON.)
                      param: null
                      type: invalid_request_error
                    request_id: 3f7db127
                simple:
                  summary: Simple error (unhandled cases)
                  value:
                    error: Model name is required
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
              examples:
                invalid_api_key:
                  summary: Invalid API key provided
                  value:
                    error:
                      message: >-
                        Incorrect API key provided: *****. You can find your API
                        key at https://cloud.sambanova.ai/apis.
                      type: invalid_request_error
                      param: null
                      code: invalid_api_key
                    request_id: d79vcq57os633dverhi0
                missing_api_key:
                  summary: No API key provided
                  value:
                    error:
                      message: >-
                        You didn't provide an API key. You need to provide your
                        API key in an Authorization header using Bearer auth
                        (i.e. Authorization: Bearer YOUR_KEY).
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: d7a0dct7os633dvesi60
        '404':
          description: Not found - model does not exist or wrong endpoint called
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                model_not_found:
                  summary: Model does not exist or is not accessible
                  value:
                    error:
                      code: model_not_found
                      message: >-
                        The model `abc` does not exist or you do not have access
                        to it.
                      param: model
                      type: invalid_request_error
                    request_id: 887a8227
                simple:
                  summary: Simple error (unhandled cases e.g. wrong endpoint)
                  value:
                    error: Not found
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '410':
          description: Gone - model is no longer available (deprecated or removed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
        '500':
          description: Internal Server Error. Unexpected issue on server side.
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Temporarily Unavailable
          content:
            text/plain:
              schema:
                type: string
                example: Service Temporarily Unavailable
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const completion = await client.completions.create({
              model: 'gpt-oss-120b',
              prompt:
                '<|begin_of_text|><|start_header_id|>system<|end_header_id|> You are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|> create a poem using palindromes<|eot_id|><|start_header_id|>assistant<|end_header_id|>',
            });

            console.log(completion);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            for completion in client.completions.create(
                model="gpt-oss-120b",
                prompt="<|begin_of_text|><|start_header_id|>system<|end_header_id|> You are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|> create a poem using palindromes<|eot_id|><|start_header_id|>assistant<|end_header_id|>",
            ):
              print(completion)
  /responses:
    post:
      operationId: createResponse
      tags:
        - Responses
      summary: Create a model response
      description: >-
        Creates a model response for the given input. Only `type: "function"`
        tools are supported; other tool types are filtered server-side.
        SambaNova is stateless, conversation history must be supplied in full
        via `input[]` on each request.
      security:
        - api_key: []
      requestBody:
        required: true
        description: Response creation parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponseRequest'
      responses:
        '200':
          description: >-
            Successful response. Returns a ResponseResponse object
            (non-streaming), or a stream of server-sent ResponseStreamEvent
            object events ending with a response.completed event (when stream:
            true).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ResponseResponse'
                  - $ref: '#/components/schemas/ResponseStreamEvent'
        '400':
          description: Bad Request — missing or invalid parameters
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                missing_input:
                  summary: Required field missing
                  value:
                    error:
                      message: 'Missing required field: ''input''.'
                      type: invalid_request_error
                      param: input
                      code: missing_required_field
                    request_id: abc123
                invalid_role:
                  summary: Invalid role on input item
                  value:
                    error:
                      message: >-
                        Invalid value: 'foo'. Supported values are: 'user',
                        'assistant', 'system', 'developer'.
                      type: invalid_request_error
                      param: input[1].role
                      code: invalid_value
                    request_id: abc124
                empty_input:
                  summary: Empty input array
                  value:
                    error:
                      message: >-
                        Invalid value for 'input': expected a non-empty array or
                        string.
                      type: invalid_request_error
                      param: input
                      code: invalid_value
                    request_id: abc125
                invalid_json:
                  summary: Malformed JSON body
                  value:
                    error:
                      code: null
                      message: >-
                        We could not parse the JSON body of your request. (HINT:
                        This likely means you aren't using your HTTP library
                        correctly. A JSON payload is expected, but what was sent
                        was not valid JSON.)
                      param: null
                      type: invalid_request_error
                    request_id: 3f7db127
                adapter_mapping_failed:
                  summary: Server failed to parse model tool call output
                  value:
                    error:
                      code: adapter_mapping_failed
                      error_model_output: |-
                        {
                          "name": "get_weather",
                          "arguments": {
                            city: "Bogotá"
                          }
                        }
                      message: >-
                        Failed to parse tool call from GPT OSS output: Expecting
                        property name enclosed in double quotes: line 4 column 5
                        (char 48)
                      param: null
                      type: server_error
                    request_id: 494e734dc82b4b37bd914238c79c3e6c
                simple:
                  summary: Simple error (unhandled cases)
                  value:
                    error: Unhandled error
        '401':
          description: Unauthorized — invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
              examples:
                invalid_api_key:
                  summary: Invalid API key
                  value:
                    error:
                      message: >-
                        Incorrect API key provided: *****. You can find your API
                        key at https://cloud.sambanova.ai/apis.
                      type: invalid_request_error
                      param: null
                      code: invalid_api_key
                    request_id: abc126
                missing_api_key:
                  summary: No API key provided
                  value:
                    error:
                      message: >-
                        You didn't provide an API key. You need to provide your
                        API key in an Authorization header using Bearer auth
                        (i.e. Authorization: Bearer YOUR_KEY).
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: abc127
        '404':
          description: Not found — model does not exist or is not accessible
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
              examples:
                model_not_found:
                  summary: Model does not exist or is not accessible
                  value:
                    error:
                      message: >-
                        The model `abc` does not exist or you do not have access
                        to it.
                      type: invalid_request_error
                      param: model
                      code: model_not_found
                    request_id: abc128
                simple:
                  summary: Simple error (unhandled cases e.g. wrong endpoint)
                  value:
                    error: Not found
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '410':
          description: Gone — model is no longer available (deprecated or removed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '429':
          description: Too Many Requests — rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
        '500':
          description: Internal Server Error — unexpected issue on server side
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Temporarily Unavailable
          content:
            text/plain:
              schema:
                type: string
                example: Service Temporarily Unavailable
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.responses.create({
              input: [
                {
                  content: 'What is the weather in San Francisco?',
                  role: 'user',
                  type: 'message',
                },
                {
                  content: [
                    { text: 'The weather in San Francisco is 65°F and partly cloudy.', type: 'output_text' },
                  ],
                  role: 'assistant',
                  type: 'message',
                },
                {
                  content: 'What should I wear?',
                  role: 'user',
                  type: 'message',
                },
              ],
              model: 'gpt-oss-120b',
            });

            console.log(response);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            for response in client.responses.create(
                input=[{
                    "content": "What is the weather in San Francisco?",
                    "role": "user",
                    "type": "message",
                }, {
                    "content": [{
                        "text": "The weather in San Francisco is 65°F and partly cloudy.",
                        "type": "output_text",
                    }],
                    "role": "assistant",
                    "type": "message",
                }, {
                    "content": "What should I wear?",
                    "role": "user",
                    "type": "message",
                }],
                model="gpt-oss-120b",
            ):
              print(response)
  /embeddings:
    post:
      operationId: createEmbedding
      tags:
        - Embeddings
      summary: Create embeddings
      security:
        - api_key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
        description: Texts to embed and parameters
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingsResponse'
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            text/plain:
              schema:
                type: string
                example: 'Invalid request body:  - missing property ''model''"'
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                missing_model:
                  summary: No model parameter provided
                  value:
                    error:
                      message: you must provide a model parameter
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: a4fa849e
                invalid_json:
                  summary: Malformed JSON body
                  value:
                    error:
                      code: null
                      message: >-
                        We could not parse the JSON body of your request. (HINT:
                        This likely means you aren't using your HTTP library
                        correctly. A JSON payload is expected, but what was sent
                        was not valid JSON.)
                      param: null
                      type: invalid_request_error
                    request_id: 3f7db127
                simple:
                  summary: Simple error (unhandled cases)
                  value:
                    error: Model name is required
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
              examples:
                invalid_api_key:
                  summary: Invalid API key provided
                  value:
                    error:
                      message: >-
                        Incorrect API key provided: *****. You can find your API
                        key at https://cloud.sambanova.ai/apis.
                      type: invalid_request_error
                      param: null
                      code: invalid_api_key
                    request_id: d79vcq57os633dverhi0
                missing_api_key:
                  summary: No API key provided
                  value:
                    error:
                      message: >-
                        You didn't provide an API key. You need to provide your
                        API key in an Authorization header using Bearer auth
                        (i.e. Authorization: Bearer YOUR_KEY).
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: d7a0dct7os633dvesi60
        '404':
          description: Not found - model does not exist or wrong endpoint called
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                model_not_found:
                  summary: Model does not exist or is not accessible
                  value:
                    error:
                      code: model_not_found
                      message: >-
                        The model `abc` does not exist or you do not have access
                        to it.
                      param: model
                      type: invalid_request_error
                    request_id: 887a8227
                simple:
                  summary: Simple error (unhandled cases e.g. wrong endpoint)
                  value:
                    error: Not found
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '410':
          description: Gone - model is no longer available (deprecated or removed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
        '500':
          description: Internal Server Error. Unexpected issue on server side.
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Temporarily Unavailable
          content:
            text/plain:
              schema:
                type: string
                example: Service Temporarily Unavailable
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const embeddingsResponse = await client.embeddings.create({
              input: ['text to embed number 1', 'text to embed number 2'],
              model: 'E5-Mistral-7B-Instruct',
            });

            console.log(embeddingsResponse.data);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            embeddings_response = client.embeddings.create(
                input=["text to embed number 1", "text to embed number 2"],
                model="E5-Mistral-7B-Instruct",
            )
            print(embeddings_response.data)
  /audio/transcriptions:
    post:
      operationId: createTranscription
      tags:
        - Audio
      summary: Transcribes audio into the input language.
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TranscriptionRequest'
        description: Audio to transcribe and parameters
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TranscriptionResponse'
                  - $ref: '#/components/schemas/TranscriptionStreamResponse'
            text/plain:
              schema:
                type: string
                example: >-
                  It's a sound effect of a bell chiming, specifically a church
                  bell.
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            text/plain:
              schema:
                type: string
                example: 'Invalid request body:  - missing property ''model''"'
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                missing_model:
                  summary: No model parameter provided
                  value:
                    error:
                      message: you must provide a model parameter
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: a4fa849e
                simple:
                  summary: Simple error (unhandled cases)
                  value:
                    error: Model name is required
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
              examples:
                invalid_api_key:
                  summary: Invalid API key provided
                  value:
                    error:
                      message: >-
                        Incorrect API key provided: *****. You can find your API
                        key at https://cloud.sambanova.ai/apis.
                      type: invalid_request_error
                      param: null
                      code: invalid_api_key
                    request_id: d79vcq57os633dverhi0
                missing_api_key:
                  summary: No API key provided
                  value:
                    error:
                      message: >-
                        You didn't provide an API key. You need to provide your
                        API key in an Authorization header using Bearer auth
                        (i.e. Authorization: Bearer YOUR_KEY).
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: d7a0dct7os633dvesi60
        '404':
          description: Not found - model does not exist or wrong endpoint called
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                model_not_found:
                  summary: Model does not exist or is not accessible
                  value:
                    error:
                      code: model_not_found
                      message: >-
                        The model `abc` does not exist or you do not have access
                        to it.
                      param: model
                      type: invalid_request_error
                    request_id: 887a8227
                simple:
                  summary: Simple error (unhandled cases e.g. wrong endpoint)
                  value:
                    error: Not found
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '410':
          description: Gone - model is no longer available (deprecated or removed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
        '500':
          description: Internal Server Error. Unexpected issue on server side.
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Temporarily Unavailable
          content:
            text/plain:
              schema:
                type: string
                example: Service Temporarily Unavailable
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import fs from 'fs';
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const transcription = await client.audio.transcriptions.create({
              file: fs.createReadStream('path/to/file'),
              model: 'Whisper-Large-v3',
            });

            console.log(transcription);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            for transcription in client.audio.transcriptions.create(
                file=b"Example data",
                model="Whisper-Large-v3",
            ):
              print(transcription)
  /audio/translations:
    post:
      operationId: createTranslation
      tags:
        - Audio
      summary: Translate audio into English.
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TranslationRequest'
        description: Audio to translate and parameters
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TranslationResponse'
                  - $ref: '#/components/schemas/TranslationStreamResponse'
            text/plain:
              schema:
                type: string
                example: >-
                  It's a sound effect of a bell chiming, specifically a church
                  bell.
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            text/plain:
              schema:
                type: string
                example: 'Invalid request body:  - missing property ''model''"'
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                missing_model:
                  summary: No model parameter provided
                  value:
                    error:
                      message: you must provide a model parameter
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: a4fa849e
                simple:
                  summary: Simple error (unhandled cases)
                  value:
                    error: Model name is required
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
              examples:
                invalid_api_key:
                  summary: Invalid API key provided
                  value:
                    error:
                      message: >-
                        Incorrect API key provided: *****. You can find your API
                        key at https://cloud.sambanova.ai/apis.
                      type: invalid_request_error
                      param: null
                      code: invalid_api_key
                    request_id: d79vcq57os633dverhi0
                missing_api_key:
                  summary: No API key provided
                  value:
                    error:
                      message: >-
                        You didn't provide an API key. You need to provide your
                        API key in an Authorization header using Bearer auth
                        (i.e. Authorization: Bearer YOUR_KEY).
                      type: invalid_request_error
                      param: null
                      code: null
                    request_id: d7a0dct7os633dvesi60
        '404':
          description: Not found - model does not exist or wrong endpoint called
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GeneralError'
                  - $ref: '#/components/schemas/SimpleError'
              examples:
                model_not_found:
                  summary: Model does not exist or is not accessible
                  value:
                    error:
                      code: model_not_found
                      message: >-
                        The model `abc` does not exist or you do not have access
                        to it.
                      param: model
                      type: invalid_request_error
                    request_id: 887a8227
                simple:
                  summary: Simple error (unhandled cases e.g. wrong endpoint)
                  value:
                    error: Not found
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '410':
          description: Gone - model is no longer available (deprecated or removed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
        '500':
          description: Internal Server Error. Unexpected issue on server side.
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Temporarily Unavailable
          content:
            text/plain:
              schema:
                type: string
                example: Service Temporarily Unavailable
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import fs from 'fs';
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const translation = await client.audio.translations.create({
              file: fs.createReadStream('path/to/file'),
              model: 'Whisper-Large-v3',
            });

            console.log(translation);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            for translation in client.audio.translations.create(
                file=b"Example data",
                model="Whisper-Large-v3",
            ):
              print(translation)
  /models:
    get:
      operationId: getModelList
      tags:
        - Models
      summary: Get environment's available model list metadata
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelMetadataList'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const modelsResponse = await client.models.list();

            console.log(modelsResponse.data);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            models_response = client.models.list()
            print(models_response.data)
  /models/{model_id}:
    get:
      operationId: getModel
      tags:
        - Models
      summary: Get environment's available model metadata
      parameters:
        - in: path
          name: model_id
          required: true
          schema:
            title: Model Id
            type: string
            description: model id to get metadata
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelMetadata'
          description: Successful Response
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import SambaNova from 'sambanova';

            const client = new SambaNova({
              apiKey: process.env['SAMBANOVA_API_KEY'], // This is the default and can be omitted
            });

            const modelResponse = await client.models.retrieve('model_id');

            console.log(modelResponse.id);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            model_response = client.models.retrieve(
                "model_id",
            )
            print(model_response.id)
security:
  - api_key: []
