{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-response-stream-event-schema.json",
  "title": "ResponseStreamEvent",
  "description": "An event in the Responses API SSE stream; `type` identifies the event.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parallel-ai-responses-api-api-openapi.yml#/components/schemas/ResponseStreamEvent",
  "anyOf": [
    {
      "$ref": "#/$defs/ResponseCreatedEvent"
    },
    {
      "$ref": "#/$defs/ResponseInProgressEvent"
    },
    {
      "$ref": "#/$defs/ResponseOutputItemAddedEvent"
    },
    {
      "$ref": "#/$defs/ResponseContentPartAddedEvent"
    },
    {
      "$ref": "#/$defs/ResponseTextDeltaEvent"
    },
    {
      "$ref": "#/$defs/ResponseTextDoneEvent"
    },
    {
      "$ref": "#/$defs/ResponseOutputTextAnnotationAddedEvent"
    },
    {
      "$ref": "#/$defs/ResponseContentPartDoneEvent"
    },
    {
      "$ref": "#/$defs/ResponseOutputItemDoneEvent"
    },
    {
      "$ref": "#/$defs/ResponseCompletedEvent"
    },
    {
      "$ref": "#/$defs/ResponseFailedEvent"
    },
    {
      "$ref": "#/$defs/ResponseIncompleteEvent"
    }
  ],
  "$defs": {
    "AnnotationURLCitation": {
      "additionalProperties": true,
      "description": "A citation for a web resource used to generate a model response.",
      "properties": {
        "end_index": {
          "title": "End Index",
          "type": "integer"
        },
        "start_index": {
          "title": "Start Index",
          "type": "integer"
        },
        "title": {
          "title": "Title",
          "type": "string"
        },
        "type": {
          "const": "url_citation",
          "title": "Type",
          "type": "string"
        },
        "url": {
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "end_index",
        "start_index",
        "title",
        "type",
        "url"
      ],
      "title": "AnnotationURLCitation",
      "type": "object"
    },
    "IncompleteDetails": {
      "additionalProperties": true,
      "description": "Details about why the response is incomplete.",
      "properties": {
        "reason": {
          "anyOf": [
            {
              "enum": [
                "max_output_tokens",
                "content_filter"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Reason"
        }
      },
      "title": "IncompleteDetails",
      "type": "object"
    },
    "InputTokensDetails": {
      "additionalProperties": true,
      "description": "A detailed breakdown of the input tokens.",
      "properties": {
        "cached_tokens": {
          "title": "Cached Tokens",
          "type": "integer"
        }
      },
      "required": [
        "cached_tokens"
      ],
      "title": "InputTokensDetails",
      "type": "object"
    },
    "Moderation": {
      "additionalProperties": true,
      "description": "Moderation results for the response input and output, if moderated completions were requested.",
      "properties": {
        "input": {
          "anyOf": [
            {
              "$ref": "#/$defs/ModerationInputModerationResult"
            },
            {
              "$ref": "#/$defs/ModerationInputError"
            }
          ],
          "title": "Input"
        },
        "output": {
          "anyOf": [
            {
              "$ref": "#/$defs/ModerationOutputModerationResult"
            },
            {
              "$ref": "#/$defs/ModerationOutputError"
            }
          ],
          "title": "Output"
        }
      },
      "required": [
        "input",
        "output"
      ],
      "title": "Moderation",
      "type": "object"
    },
    "ModerationInputError": {
      "additionalProperties": true,
      "description": "An error produced while attempting moderation for the response input or output.",
      "properties": {
        "code": {
          "title": "Code",
          "type": "string"
        },
        "message": {
          "title": "Message",
          "type": "string"
        },
        "type": {
          "const": "error",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message",
        "type"
      ],
      "title": "ModerationInputError",
      "type": "object"
    },
    "ModerationInputModerationResult": {
      "additionalProperties": true,
      "description": "A moderation result produced for the response input or output.",
      "properties": {
        "categories": {
          "additionalProperties": {
            "type": "boolean"
          },
          "title": "Categories",
          "type": "object"
        },
        "category_applied_input_types": {
          "additionalProperties": {
            "items": {
              "enum": [
                "text",
                "image"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "title": "Category Applied Input Types",
          "type": "object"
        },
        "category_scores": {
          "additionalProperties": {
            "type": "number"
          },
          "title": "Category Scores",
          "type": "object"
        },
        "flagged": {
          "title": "Flagged",
          "type": "boolean"
        },
        "model": {
          "title": "Model",
          "type": "string"
        },
        "type": {
          "const": "moderation_result",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "categories",
        "category_applied_input_types",
        "category_scores",
        "flagged",
        "model",
        "type"
      ],
      "title": "ModerationInputModerationResult",
      "type": "object"
    },
    "ModerationOutputError": {
      "additionalProperties": true,
      "description": "An error produced while attempting moderation for the response input or output.",
      "properties": {
        "code": {
          "title": "Code",
          "type": "string"
        },
        "message": {
          "title": "Message",
          "type": "string"
        },
        "type": {
          "const": "error",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message",
        "type"
      ],
      "title": "ModerationOutputError",
      "type": "object"
    },
    "ModerationOutputModerationResult": {
      "additionalProperties": true,
      "description": "A moderation result produced for the response input or output.",
      "properties": {
        "categories": {
          "additionalProperties": {
            "type": "boolean"
          },
          "title": "Categories",
          "type": "object"
        },
        "category_applied_input_types": {
          "additionalProperties": {
            "items": {
              "enum": [
                "text",
                "image"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "title": "Category Applied Input Types",
          "type": "object"
        },
        "category_scores": {
          "additionalProperties": {
            "type": "number"
          },
          "title": "Category Scores",
          "type": "object"
        },
        "flagged": {
          "title": "Flagged",
          "type": "boolean"
        },
        "model": {
          "title": "Model",
          "type": "string"
        },
        "type": {
          "const": "moderation_result",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "categories",
        "category_applied_input_types",
        "category_scores",
        "flagged",
        "model",
        "type"
      ],
      "title": "ModerationOutputModerationResult",
      "type": "object"
    },
    "OutputTokensDetails": {
      "additionalProperties": true,
      "description": "A detailed breakdown of the output tokens.",
      "properties": {
        "reasoning_tokens": {
          "title": "Reasoning Tokens",
          "type": "integer"
        }
      },
      "required": [
        "reasoning_tokens"
      ],
      "title": "OutputTokensDetails",
      "type": "object"
    },
    "Response": {
      "additionalProperties": true,
      "description": "A response from the `parallel` model. A completed response contains a\nsingle assistant message whose text is annotated with URL citations\ngrounding the answer.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "created_at": {
          "title": "Created At",
          "type": "number"
        },
        "error": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResponseError"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "incomplete_details": {
          "anyOf": [
            {
              "$ref": "#/$defs/IncompleteDetails"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "instructions": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Instructions"
        },
        "metadata": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metadata"
        },
        "model": {
          "const": "parallel",
          "default": "parallel",
          "title": "Model",
          "type": "string"
        },
        "object": {
          "const": "response",
          "title": "Object",
          "type": "string"
        },
        "output": {
          "items": {
            "$ref": "#/$defs/ResponseOutputMessage"
          },
          "title": "Output",
          "type": "array"
        },
        "parallel_tool_calls": {
          "title": "Parallel Tool Calls",
          "type": "boolean"
        },
        "temperature": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Temperature"
        },
        "tool_choice": {
          "default": "auto",
          "title": "Tool Choice",
          "type": "string"
        },
        "tools": {
          "default": [],
          "items": {},
          "title": "Tools",
          "type": "array"
        },
        "top_p": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Top P"
        },
        "background": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Background"
        },
        "completed_at": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Completed At"
        },
        "conversation": {
          "default": null,
          "title": "Conversation",
          "type": "null"
        },
        "max_output_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Max Output Tokens"
        },
        "max_tool_calls": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Max Tool Calls"
        },
        "moderation": {
          "anyOf": [
            {
              "$ref": "#/$defs/Moderation"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "previous_response_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Previous Response Id"
        },
        "prompt": {
          "default": null,
          "title": "Prompt",
          "type": "null"
        },
        "prompt_cache_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Prompt Cache Key"
        },
        "prompt_cache_retention": {
          "anyOf": [
            {
              "enum": [
                "in_memory",
                "24h"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Prompt Cache Retention"
        },
        "reasoning": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResponseReasoningConfig"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "safety_identifier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Safety Identifier"
        },
        "service_tier": {
          "anyOf": [
            {
              "enum": [
                "auto",
                "default",
                "flex",
                "scale",
                "priority"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Service Tier"
        },
        "status": {
          "anyOf": [
            {
              "enum": [
                "completed",
                "failed",
                "in_progress",
                "cancelled",
                "queued",
                "incomplete"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "text": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResponseTextConfig"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "top_logprobs": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Top Logprobs"
        },
        "truncation": {
          "anyOf": [
            {
              "enum": [
                "auto",
                "disabled"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Truncation"
        },
        "usage": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResponseUsage"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "user": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "User"
        }
      },
      "required": [
        "id",
        "created_at",
        "object",
        "output",
        "parallel_tool_calls"
      ],
      "title": "Response",
      "type": "object"
    },
    "ResponseCompletedEvent": {
      "additionalProperties": true,
      "properties": {
        "response": {
          "$ref": "#/$defs/Response"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.completed",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "response",
        "sequence_number",
        "type"
      ],
      "title": "ResponseCompletedEvent",
      "type": "object"
    },
    "ResponseContentPartAddedEvent": {
      "additionalProperties": true,
      "properties": {
        "content_index": {
          "title": "Content Index",
          "type": "integer"
        },
        "item_id": {
          "title": "Item Id",
          "type": "string"
        },
        "output_index": {
          "title": "Output Index",
          "type": "integer"
        },
        "part": {
          "$ref": "#/$defs/ResponseOutputText"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.content_part.added",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "content_index",
        "item_id",
        "output_index",
        "part",
        "sequence_number",
        "type"
      ],
      "title": "ResponseContentPartAddedEvent",
      "type": "object"
    },
    "ResponseContentPartDoneEvent": {
      "additionalProperties": true,
      "properties": {
        "content_index": {
          "title": "Content Index",
          "type": "integer"
        },
        "item_id": {
          "title": "Item Id",
          "type": "string"
        },
        "output_index": {
          "title": "Output Index",
          "type": "integer"
        },
        "part": {
          "$ref": "#/$defs/ResponseOutputText"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.content_part.done",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "content_index",
        "item_id",
        "output_index",
        "part",
        "sequence_number",
        "type"
      ],
      "title": "ResponseContentPartDoneEvent",
      "type": "object"
    },
    "ResponseCreatedEvent": {
      "additionalProperties": true,
      "properties": {
        "response": {
          "$ref": "#/$defs/Response"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.created",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "response",
        "sequence_number",
        "type"
      ],
      "title": "ResponseCreatedEvent",
      "type": "object"
    },
    "ResponseError": {
      "additionalProperties": true,
      "description": "Details of a failed response.",
      "properties": {
        "code": {
          "const": "server_error",
          "description": "Error code; currently always \"server_error\".",
          "title": "Code",
          "type": "string"
        },
        "message": {
          "title": "Message",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "ResponseError",
      "type": "object"
    },
    "ResponseFailedEvent": {
      "additionalProperties": true,
      "properties": {
        "response": {
          "$ref": "#/$defs/Response"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.failed",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "response",
        "sequence_number",
        "type"
      ],
      "title": "ResponseFailedEvent",
      "type": "object"
    },
    "ResponseFormatJSONObject": {
      "additionalProperties": true,
      "description": "JSON object response format.\n\nAn older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.",
      "properties": {
        "type": {
          "const": "json_object",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "ResponseFormatJSONObject",
      "type": "object"
    },
    "ResponseFormatText": {
      "additionalProperties": true,
      "description": "Default response format. Used to generate text responses.",
      "properties": {
        "type": {
          "const": "text",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "ResponseFormatText",
      "type": "object"
    },
    "ResponseFormatTextJSONSchemaConfig": {
      "additionalProperties": true,
      "description": "JSON Schema output format: the response's output text conforms to `schema`.",
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "schema": {
          "additionalProperties": true,
          "title": "Schema",
          "type": "object"
        },
        "type": {
          "const": "json_schema",
          "title": "Type",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "strict": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Strict"
        }
      },
      "required": [
        "name",
        "schema",
        "type"
      ],
      "title": "ResponseFormatTextJSONSchemaConfig",
      "type": "object"
    },
    "ResponseInProgressEvent": {
      "additionalProperties": true,
      "properties": {
        "response": {
          "$ref": "#/$defs/Response"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.in_progress",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "response",
        "sequence_number",
        "type"
      ],
      "title": "ResponseInProgressEvent",
      "type": "object"
    },
    "ResponseIncompleteEvent": {
      "additionalProperties": true,
      "properties": {
        "response": {
          "$ref": "#/$defs/Response"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.incomplete",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "response",
        "sequence_number",
        "type"
      ],
      "title": "ResponseIncompleteEvent",
      "type": "object"
    },
    "ResponseOutputItemAddedEvent": {
      "additionalProperties": true,
      "properties": {
        "item": {
          "$ref": "#/$defs/ResponseOutputMessage"
        },
        "output_index": {
          "title": "Output Index",
          "type": "integer"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.output_item.added",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "item",
        "output_index",
        "sequence_number",
        "type"
      ],
      "title": "ResponseOutputItemAddedEvent",
      "type": "object"
    },
    "ResponseOutputItemDoneEvent": {
      "additionalProperties": true,
      "properties": {
        "item": {
          "$ref": "#/$defs/ResponseOutputMessage"
        },
        "output_index": {
          "title": "Output Index",
          "type": "integer"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.output_item.done",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "item",
        "output_index",
        "sequence_number",
        "type"
      ],
      "title": "ResponseOutputItemDoneEvent",
      "type": "object"
    },
    "ResponseOutputMessage": {
      "additionalProperties": true,
      "description": "An assistant message produced by the model.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "content": {
          "items": {
            "$ref": "#/$defs/ResponseOutputText"
          },
          "title": "Content",
          "type": "array"
        },
        "role": {
          "const": "assistant",
          "title": "Role",
          "type": "string"
        },
        "status": {
          "enum": [
            "in_progress",
            "completed",
            "incomplete"
          ],
          "title": "Status",
          "type": "string"
        },
        "type": {
          "const": "message",
          "title": "Type",
          "type": "string"
        },
        "phase": {
          "anyOf": [
            {
              "enum": [
                "commentary",
                "final_answer"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Phase"
        }
      },
      "required": [
        "id",
        "content",
        "role",
        "status",
        "type"
      ],
      "title": "ResponseOutputMessage",
      "type": "object"
    },
    "ResponseOutputText": {
      "additionalProperties": true,
      "description": "A text content part of an output message. `annotations` carries the URL\ncitations grounding the answer.",
      "properties": {
        "annotations": {
          "items": {
            "$ref": "#/$defs/AnnotationURLCitation"
          },
          "title": "Annotations",
          "type": "array"
        },
        "text": {
          "title": "Text",
          "type": "string"
        },
        "type": {
          "const": "output_text",
          "title": "Type",
          "type": "string"
        },
        "logprobs": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/openai__types__responses__response_output_text__Logprob"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Logprobs"
        }
      },
      "required": [
        "annotations",
        "text",
        "type"
      ],
      "title": "ResponseOutputText",
      "type": "object"
    },
    "ResponseOutputTextAnnotationAddedEvent": {
      "additionalProperties": true,
      "properties": {
        "annotation": {
          "$ref": "#/$defs/AnnotationURLCitation"
        },
        "annotation_index": {
          "title": "Annotation Index",
          "type": "integer"
        },
        "content_index": {
          "title": "Content Index",
          "type": "integer"
        },
        "item_id": {
          "title": "Item Id",
          "type": "string"
        },
        "output_index": {
          "title": "Output Index",
          "type": "integer"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.output_text.annotation.added",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "annotation",
        "annotation_index",
        "content_index",
        "item_id",
        "output_index",
        "sequence_number",
        "type"
      ],
      "title": "ResponseOutputTextAnnotationAddedEvent",
      "type": "object"
    },
    "ResponseReasoningConfig": {
      "description": "Reasoning configuration (OpenAI-compatible subset).",
      "properties": {
        "effort": {
          "anyOf": [
            {
              "enum": [
                "low",
                "medium",
                "high"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Controls how much research is performed, trading response time for answer quality. Defaults to `medium` when omitted.",
          "title": "Effort"
        }
      },
      "title": "ResponseReasoningConfig",
      "type": "object"
    },
    "ResponseTextConfig": {
      "additionalProperties": true,
      "description": "Text output configuration. By default the response is plain text; for\nstructured output set `format` to\n`{\"type\": \"json_schema\", \"name\": ..., \"schema\": {...}}`. The `json_object`\nformat is accepted for compatibility but produces plain text.",
      "properties": {
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResponseFormatText"
            },
            {
              "$ref": "#/$defs/ResponseFormatTextJSONSchemaConfig"
            },
            {
              "$ref": "#/$defs/ResponseFormatJSONObject"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format"
        },
        "verbosity": {
          "anyOf": [
            {
              "enum": [
                "low",
                "medium",
                "high"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Verbosity"
        }
      },
      "title": "ResponseTextConfig",
      "type": "object"
    },
    "ResponseTextDeltaEvent": {
      "additionalProperties": true,
      "description": "Emitted when there is an additional text delta.",
      "properties": {
        "content_index": {
          "title": "Content Index",
          "type": "integer"
        },
        "delta": {
          "title": "Delta",
          "type": "string"
        },
        "item_id": {
          "title": "Item Id",
          "type": "string"
        },
        "logprobs": {
          "items": {
            "$ref": "#/$defs/openai__types__responses__response_text_delta_event__Logprob"
          },
          "title": "Logprobs",
          "type": "array"
        },
        "output_index": {
          "title": "Output Index",
          "type": "integer"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "type": {
          "const": "response.output_text.delta",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "content_index",
        "delta",
        "item_id",
        "logprobs",
        "output_index",
        "sequence_number",
        "type"
      ],
      "title": "ResponseTextDeltaEvent",
      "type": "object"
    },
    "ResponseTextDoneEvent": {
      "additionalProperties": true,
      "description": "Emitted when text content is finalized.",
      "properties": {
        "content_index": {
          "title": "Content Index",
          "type": "integer"
        },
        "item_id": {
          "title": "Item Id",
          "type": "string"
        },
        "logprobs": {
          "items": {
            "$ref": "#/$defs/openai__types__responses__response_text_done_event__Logprob"
          },
          "title": "Logprobs",
          "type": "array"
        },
        "output_index": {
          "title": "Output Index",
          "type": "integer"
        },
        "sequence_number": {
          "title": "Sequence Number",
          "type": "integer"
        },
        "text": {
          "title": "Text",
          "type": "string"
        },
        "type": {
          "const": "response.output_text.done",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "content_index",
        "item_id",
        "logprobs",
        "output_index",
        "sequence_number",
        "text",
        "type"
      ],
      "title": "ResponseTextDoneEvent",
      "type": "object"
    },
    "ResponseUsage": {
      "additionalProperties": true,
      "description": "Estimated token usage, populated for OpenAI SDK compatibility. Counts\nare approximate; Parallel bills per request, not per token.",
      "properties": {
        "input_tokens": {
          "title": "Input Tokens",
          "type": "integer"
        },
        "input_tokens_details": {
          "$ref": "#/$defs/InputTokensDetails"
        },
        "output_tokens": {
          "title": "Output Tokens",
          "type": "integer"
        },
        "output_tokens_details": {
          "$ref": "#/$defs/OutputTokensDetails"
        },
        "total_tokens": {
          "title": "Total Tokens",
          "type": "integer"
        }
      },
      "required": [
        "input_tokens",
        "input_tokens_details",
        "output_tokens",
        "output_tokens_details",
        "total_tokens"
      ],
      "title": "ResponseUsage",
      "type": "object"
    },
    "openai__types__responses__response_output_text__Logprob": {
      "additionalProperties": true,
      "description": "The log probability of a token.",
      "properties": {
        "token": {
          "title": "Token",
          "type": "string"
        },
        "bytes": {
          "items": {
            "type": "integer"
          },
          "title": "Bytes",
          "type": "array"
        },
        "logprob": {
          "title": "Logprob",
          "type": "number"
        },
        "top_logprobs": {
          "items": {
            "$ref": "#/$defs/openai__types__responses__response_output_text__LogprobTopLogprob"
          },
          "title": "Top Logprobs",
          "type": "array"
        }
      },
      "required": [
        "token",
        "bytes",
        "logprob",
        "top_logprobs"
      ],
      "title": "Logprob",
      "type": "object"
    },
    "openai__types__responses__response_output_text__LogprobTopLogprob": {
      "additionalProperties": true,
      "description": "The top log probability of a token.",
      "properties": {
        "token": {
          "title": "Token",
          "type": "string"
        },
        "bytes": {
          "items": {
            "type": "integer"
          },
          "title": "Bytes",
          "type": "array"
        },
        "logprob": {
          "title": "Logprob",
          "type": "number"
        }
      },
      "required": [
        "token",
        "bytes",
        "logprob"
      ],
      "title": "LogprobTopLogprob",
      "type": "object"
    },
    "openai__types__responses__response_text_delta_event__Logprob": {
      "additionalProperties": true,
      "description": "A logprob is the logarithmic probability that the model assigns to producing\na particular token at a given position in the sequence. Less-negative (higher)\nlogprob values indicate greater model confidence in that token choice.",
      "properties": {
        "token": {
          "title": "Token",
          "type": "string"
        },
        "logprob": {
          "title": "Logprob",
          "type": "number"
        },
        "top_logprobs": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/openai__types__responses__response_text_delta_event__LogprobTopLogprob"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Top Logprobs"
        }
      },
      "required": [
        "token",
        "logprob"
      ],
      "title": "Logprob",
      "type": "object"
    },
    "openai__types__responses__response_text_delta_event__LogprobTopLogprob": {
      "additionalProperties": true,
      "properties": {
        "token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Token"
        },
        "logprob": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Logprob"
        }
      },
      "title": "LogprobTopLogprob",
      "type": "object"
    },
    "openai__types__responses__response_text_done_event__Logprob": {
      "additionalProperties": true,
      "description": "A logprob is the logarithmic probability that the model assigns to producing\na particular token at a given position in the sequence. Less-negative (higher)\nlogprob values indicate greater model confidence in that token choice.",
      "properties": {
        "token": {
          "title": "Token",
          "type": "string"
        },
        "logprob": {
          "title": "Logprob",
          "type": "number"
        },
        "top_logprobs": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/openai__types__responses__response_text_done_event__LogprobTopLogprob"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Top Logprobs"
        }
      },
      "required": [
        "token",
        "logprob"
      ],
      "title": "Logprob",
      "type": "object"
    },
    "openai__types__responses__response_text_done_event__LogprobTopLogprob": {
      "additionalProperties": true,
      "properties": {
        "token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Token"
        },
        "logprob": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Logprob"
        }
      },
      "title": "LogprobTopLogprob",
      "type": "object"
    }
  }
}