---
title: "RealtimeResponseCreateParams"
url: "https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1/schemas/RealtimeResponseCreateParams"
---

> Full API specification: https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1.md

# RealtimeResponseCreateParams

Create a new Realtime response with these parameters

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: OpenAI API
  version: 2.3.0
servers:
  - url: https://api.openai.com/v1
components:
  schemas:
    Metadata:
      type: object
      description: >
        Set of 16 key-value pairs that can be attached to an object. This can be

        useful for storing additional information about the object in a
        structured

        format, and querying for objects via API or the dashboard. 


        Keys are strings with a maximum length of 64 characters. Values are
        strings

        with a maximum length of 512 characters.
      additionalProperties:
        type: string
      x-oaiTypeLabel: map
      nullable: true
    RealtimeConversationItemWithReference:
      type: object
      x-oaiExpandable: true
      description: The item to add to the conversation.
      properties:
        id:
          type: string
          description: >
            For an item of type (`message` | `function_call` |
            `function_call_output`)

            this field allows the client to assign the unique ID of the item. It
            is

            not required because the server will generate one if not provided.


            For an item of type `item_reference`, this field is required and is
            a

            reference to any item that has previously existed in the
            conversation.
        type:
          type: string
          enum:
            - message
            - function_call
            - function_call_output
          description: >
            The type of the item (`message`, `function_call`,
            `function_call_output`, `item_reference`).
        object:
          type: string
          enum:
            - realtime.item
          description: >
            Identifier for the API object being returned - always
            `realtime.item`.
          x-stainless-const: true
        status:
          type: string
          enum:
            - completed
            - incomplete
          description: >
            The status of the item (`completed`, `incomplete`). These have no
            effect 

            on the conversation, but are accepted for consistency with the 

            `conversation.item.created` event.
        role:
          type: string
          enum:
            - user
            - assistant
            - system
          description: >
            The role of the message sender (`user`, `assistant`, `system`),
            only 

            applicable for `message` items.
        content:
          type: array
          x-oaiExpandable: true
          description: >
            The content of the message, applicable for `message` items. 

            - Message items of role `system` support only `input_text` content

            - Message items of role `user` support `input_text` and
            `input_audio` 
              content
            - Message items of role `assistant` support `text` content.
          items:
            type: object
            x-oaiExpandable: true
            properties:
              type:
                type: string
                enum:
                  - input_audio
                  - input_text
                  - item_reference
                  - text
                description: >
                  The content type (`input_text`, `input_audio`,
                  `item_reference`, `text`).
              text:
                type: string
                description: >
                  The text content, used for `input_text` and `text` content
                  types.
              id:
                type: string
                description: >
                  ID of a previous conversation item to reference (for
                  `item_reference`

                  content types in `response.create` events). These can
                  reference both

                  client and server created items.
              audio:
                type: string
                description: >
                  Base64-encoded audio bytes, used for `input_audio` content
                  type.
              transcript:
                type: string
                description: >
                  The transcript of the audio, used for `input_audio` content
                  type.
        call_id:
          type: string
          description: >
            The ID of the function call (for `function_call` and 

            `function_call_output` items). If passed on a
            `function_call_output` 

            item, the server will check that a `function_call` item with the
            same 

            ID exists in the conversation history.
        name:
          type: string
          description: |
            The name of the function being called (for `function_call` items).
        arguments:
          type: string
          description: |
            The arguments of the function call (for `function_call` items).
        output:
          type: string
          description: |
            The output of the function call (for `function_call_output` items).
    RealtimeResponseCreateParams:
      type: object
      description: Create a new Realtime response with these parameters
      properties:
        modalities:
          type: array
          description: |
            The set of modalities the model can respond with. To disable audio,
            set this to ["text"].
          items:
            type: string
            enum:
              - text
              - audio
        instructions:
          type: string
          description: >
            The default system instructions (i.e. system message) prepended to
            model 

            calls. This field allows the client to guide the model on desired 

            responses. The model can be instructed on response content and
            format, 

            (e.g. "be extremely succinct", "act friendly", "here are examples of
            good 

            responses") and on audio behavior (e.g. "talk quickly", "inject
            emotion 

            into your voice", "laugh frequently"). The instructions are not
            guaranteed 

            to be followed by the model, but they provide guidance to the model
            on the 

            desired behavior.


            Note that the server sets default instructions which will be used if
            this 

            field is not set and are visible in the `session.created` event at
            the 

            start of the session.
        voice:
          type: string
          enum:
            - alloy
            - ash
            - ballad
            - coral
            - echo
            - sage
            - shimmer
            - verse
          description: >
            The voice the model uses to respond. Voice cannot be changed during
            the 

            session once the model has responded with audio at least once.
            Current 

            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, 

            `shimmer` and `verse`.
        output_audio_format:
          type: string
          enum:
            - pcm16
            - g711_ulaw
            - g711_alaw
          description: >
            The format of output audio. Options are `pcm16`, `g711_ulaw`, or
            `g711_alaw`.
        tools:
          type: array
          description: Tools (functions) available to the model.
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - function
                description: The type of the tool, i.e. `function`.
                x-stainless-const: true
              name:
                type: string
                description: The name of the function.
              description:
                type: string
                description: >
                  The description of the function, including guidance on when
                  and how 

                  to call it, and guidance about what to tell the user when
                  calling 

                  (if anything).
              parameters:
                type: object
                description: Parameters of the function in JSON Schema.
        tool_choice:
          type: string
          description: >
            How the model chooses tools. Options are `auto`, `none`, `required`,
            or 

            specify a function, like `{"type": "function", "function": {"name":
            "my_function"}}`.
        temperature:
          type: number
          description: >
            Sampling temperature for the model, limited to [0.6, 1.2]. Defaults
            to 0.8.
        max_response_output_tokens:
          oneOf:
            - type: integer
            - type: string
              enum:
                - inf
              x-stainless-const: true
          description: |
            Maximum number of output tokens for a single assistant response,
            inclusive of tool calls. Provide an integer between 1 and 4096 to
            limit output tokens, or `inf` for the maximum available tokens for a
            given model. Defaults to `inf`.
        conversation:
          description: >
            Controls which conversation the response is added to. Currently
            supports

            `auto` and `none`, with `auto` as the default value. The `auto`
            value

            means that the contents of the response will be added to the default

            conversation. Set this to `none` to create an out-of-band response
            which 

            will not add items to default conversation.
          oneOf:
            - type: string
            - type: string
              default: auto
              enum:
                - auto
                - none
        metadata:
          $ref: "#/components/schemas/Metadata"
        input:
          type: array
          description: >
            Input items to include in the prompt for the model. Using this field

            creates a new context for this Response instead of using the default

            conversation. An empty array `[]` will clear the context for this
            Response.

            Note that this can include references to items from the default
            conversation.
          items:
            $ref: "#/components/schemas/RealtimeConversationItemWithReference"
```
