llama-stack-mirror/docs/static/deprecated-llama-stack-spec.yaml
Sébastien Han 1f388377b2
need to fix default:
Signed-off-by: Sébastien Han <seb@redhat.com>
2025-11-04 18:09:38 +01:00

27730 lines
993 KiB
YAML

openapi: 3.1.0
info:
title: Llama Stack API
description: A comprehensive API for building and deploying AI applications
version: 1.0.0
servers:
- url: https://api.llamastack.com
description: Production server
- url: https://staging-api.llamastack.com
description: Staging server
paths:
/v1/agents:
get:
tags:
- Agents
summary: List all agents.
description: List all agents.
operationId: list_agents_v1_agents_get
deprecated: true
parameters:
- name: start_index
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: The index to start the pagination from.
title: Start Index
description: The index to start the pagination from.
- name: limit
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: The number of agents to return.
title: Limit
description: The number of agents to return.
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
tags:
- Agents
summary: Create an agent.
description: Create an agent with the given configuration.
operationId: create_agent_v1_agents_post
deprecated: true
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AgentConfig-Input'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentCreateResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}:
delete:
tags:
- Agents
summary: Delete an agent.
description: Delete an agent by its ID.
operationId: delete_agent_v1_agents__agent_id__delete
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to delete.
title: Agent Id
description: The ID of the agent to delete.
responses:
'204':
description: Successful Response
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- Agents
summary: Describe an agent.
description: Describe an agent by its ID.
operationId: get_agent_v1_agents__agent_id__get
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: ID of the agent.
title: Agent Id
description: ID of the agent.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Agent'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}/session:
post:
tags:
- Agents
summary: Create a new session for an agent.
description: Create a new session for an agent.
operationId: create_agent_session_v1_agents__agent_id__session_post
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to create the session for.
title: Agent Id
description: The ID of the agent to create the session for.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAgentSessionRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentSessionCreateResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}/session/{session_id}:
delete:
tags:
- Agents
summary: Delete an agent session.
description: Delete an agent session by its ID.
operationId: delete_agents_session_v1_agents__agent_id__session__session_id__delete
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to delete the session for.
title: Agent Id
description: The ID of the agent to delete the session for.
- name: session_id
in: path
required: true
schema:
type: string
description: The ID of the session to delete.
title: Session Id
description: The ID of the session to delete.
responses:
'204':
description: Successful Response
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- Agents
summary: Retrieve an agent session.
description: Retrieve an agent session by its ID.
operationId: get_agents_session_v1_agents__agent_id__session__session_id__get
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to get the session for.
title: Agent Id
description: The ID of the agent to get the session for.
- name: session_id
in: path
required: true
schema:
type: string
description: The ID of the session to get.
title: Session Id
description: The ID of the session to get.
- name: turn_ids
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: List of turn IDs to filter the session by.
title: Turn Ids
description: List of turn IDs to filter the session by.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Session'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}/session/{session_id}/turn:
post:
tags:
- Agents
summary: Create a new turn for an agent.
description: Create a new turn for an agent.
operationId: create_agent_turn_v1_agents__agent_id__session__session_id__turn_post
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to create the turn for.
title: Agent Id
description: The ID of the agent to create the turn for.
- name: session_id
in: path
required: true
schema:
type: string
description: The ID of the session to create the turn for.
title: Session Id
description: The ID of the session to create the turn for.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AgentTurnCreateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}:
get:
tags:
- Agents
summary: Retrieve an agent turn.
description: Retrieve an agent turn by its ID.
operationId: get_agents_turn_v1_agents__agent_id__session__session_id__turn__turn_id__get
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to get the turn for.
title: Agent Id
description: The ID of the agent to get the turn for.
- name: session_id
in: path
required: true
schema:
type: string
description: The ID of the session to get the turn for.
title: Session Id
description: The ID of the session to get the turn for.
- name: turn_id
in: path
required: true
schema:
type: string
description: The ID of the turn to get.
title: Turn Id
description: The ID of the turn to get.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Turn'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume:
post:
tags:
- Agents
summary: Resume an agent turn.
description: Resume an agent turn with executed tool call responses.
operationId: resume_agent_turn_v1_agents__agent_id__session__session_id__turn__turn_id__resume_post
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to resume.
title: Agent Id
description: The ID of the agent to resume.
- name: session_id
in: path
required: true
schema:
type: string
description: The ID of the session to resume.
title: Session Id
description: The ID of the session to resume.
- name: turn_id
in: path
required: true
schema:
type: string
description: The ID of the turn to resume.
title: Turn Id
description: The ID of the turn to resume.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AgentTurnResumeRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}:
get:
tags:
- Agents
summary: Retrieve an agent step.
description: Retrieve an agent step by its ID.
operationId: get_agents_step_v1_agents__agent_id__session__session_id__turn__turn_id__step__step_id__get
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to get the step for.
title: Agent Id
description: The ID of the agent to get the step for.
- name: session_id
in: path
required: true
schema:
type: string
description: The ID of the session to get the step for.
title: Session Id
description: The ID of the session to get the step for.
- name: turn_id
in: path
required: true
schema:
type: string
description: The ID of the turn to get the step for.
title: Turn Id
description: The ID of the turn to get the step for.
- name: step_id
in: path
required: true
schema:
type: string
description: The ID of the step to get.
title: Step Id
description: The ID of the step to get.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentStepResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/agents/{agent_id}/sessions:
get:
tags:
- Agents
summary: List all sessions of an agent.
description: List all session(s) of a given agent.
operationId: list_agent_sessions_v1_agents__agent_id__sessions_get
deprecated: true
parameters:
- name: agent_id
in: path
required: true
schema:
type: string
description: The ID of the agent to list sessions for.
title: Agent Id
description: The ID of the agent to list sessions for.
- name: start_index
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: The index to start the pagination from.
title: Start Index
description: The index to start the pagination from.
- name: limit
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: The number of sessions to return.
title: Limit
description: The number of sessions to return.
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/datasets:
get:
tags:
- Datasets
summary: List all datasets
description: List all datasets
operationId: list_datasets_v1_datasets_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ListDatasetsResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
deprecated: true
post:
tags:
- Datasets
summary: Register a new dataset
description: Register a new dataset
operationId: register_dataset_v1_datasets_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterDatasetRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
deprecated: true
/v1/datasets/{dataset_id}:
delete:
tags:
- Datasets
summary: Unregister a dataset by its ID
description: Unregister a dataset by its ID
operationId: unregister_dataset_v1_datasets__dataset_id__delete
deprecated: true
parameters:
- name: dataset_id
in: path
required: true
schema:
type: string
description: The ID of the dataset to unregister
title: Dataset Id
description: The ID of the dataset to unregister
responses:
'204':
description: Successful Response
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- Datasets
summary: Get a dataset by its ID
description: Get a dataset by its ID
operationId: get_dataset_v1_datasets__dataset_id__get
deprecated: true
parameters:
- name: dataset_id
in: path
required: true
schema:
type: string
description: The ID of the dataset to get
title: Dataset Id
description: The ID of the dataset to get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/eval/benchmarks:
get:
tags:
- Benchmarks
summary: List all benchmarks
description: List all benchmarks
operationId: list_benchmarks_v1_eval_benchmarks_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ListBenchmarksResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
deprecated: true
post:
tags:
- Benchmarks
summary: Register a benchmark
description: Register a benchmark
operationId: register_benchmark_v1_eval_benchmarks_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterBenchmarkRequest'
required: true
responses:
'204':
description: Successful Response
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
deprecated: true
/v1/eval/benchmarks/{benchmark_id}:
delete:
tags:
- Benchmarks
summary: Unregister a benchmark
description: Unregister a benchmark
operationId: unregister_benchmark_v1_eval_benchmarks__benchmark_id__delete
deprecated: true
parameters:
- name: benchmark_id
in: path
required: true
schema:
type: string
description: The ID of the benchmark to unregister
title: Benchmark Id
description: The ID of the benchmark to unregister
responses:
'204':
description: Successful Response
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- Benchmarks
summary: Get a benchmark by its ID
description: Get a benchmark by its ID
operationId: get_benchmark_v1_eval_benchmarks__benchmark_id__get
deprecated: true
parameters:
- name: benchmark_id
in: path
required: true
schema:
type: string
description: The ID of the benchmark to get
title: Benchmark Id
description: The ID of the benchmark to get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Benchmark'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/eval/benchmarks/{benchmark_id}/evaluations:
post:
tags:
- Eval
summary: Evaluate a list of rows on a benchmark
description: Evaluate a list of rows on a benchmark
operationId: evaluate_rows_v1_eval_benchmarks__benchmark_id__evaluations_post
deprecated: true
parameters:
- name: benchmark_id
in: path
required: true
schema:
type: string
description: The ID of the benchmark to run the evaluation on
title: Benchmark Id
description: The ID of the benchmark to run the evaluation on
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EvaluateRowsRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/EvaluateResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/eval/benchmarks/{benchmark_id}/jobs:
post:
tags:
- Eval
summary: Run an evaluation on a benchmark
description: Run an evaluation on a benchmark
operationId: run_eval_v1_eval_benchmarks__benchmark_id__jobs_post
deprecated: true
parameters:
- name: benchmark_id
in: path
required: true
schema:
type: string
description: The ID of the benchmark to run the evaluation on
title: Benchmark Id
description: The ID of the benchmark to run the evaluation on
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BenchmarkConfig'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}:
delete:
tags:
- Eval
summary: Cancel a job
description: Cancel a job
operationId: job_cancel_v1_eval_benchmarks__benchmark_id__jobs__job_id__delete
deprecated: true
parameters:
- name: benchmark_id
in: path
required: true
schema:
type: string
description: The ID of the benchmark to run the evaluation on
title: Benchmark Id
description: The ID of the benchmark to run the evaluation on
- name: job_id
in: path
required: true
schema:
type: string
description: The ID of the job to cancel
title: Job Id
description: The ID of the job to cancel
responses:
'204':
description: Successful Response
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- Eval
summary: Get the status of a job
description: Get the status of a job
operationId: job_status_v1_eval_benchmarks__benchmark_id__jobs__job_id__get
deprecated: true
parameters:
- name: benchmark_id
in: path
required: true
schema:
type: string
description: The ID of the benchmark to run the evaluation on
title: Benchmark Id
description: The ID of the benchmark to run the evaluation on
- name: job_id
in: path
required: true
schema:
type: string
description: The ID of the job to get the status of
title: Job Id
description: The ID of the job to get the status of
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result:
get:
tags:
- Eval
summary: Get the result of a job
description: Get the result of a job
operationId: job_result_v1_eval_benchmarks__benchmark_id__jobs__job_id__result_get
deprecated: true
parameters:
- name: benchmark_id
in: path
required: true
schema:
type: string
description: The ID of the benchmark to run the evaluation on
title: Benchmark Id
description: The ID of the benchmark to run the evaluation on
- name: job_id
in: path
required: true
schema:
type: string
description: The ID of the job to get the result of
title: Job Id
description: The ID of the job to get the result of
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/EvaluateResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/post-training/job/artifacts:
get:
tags:
- Post Training
summary: Get the artifacts of a training job
description: Get the artifacts of a training job
operationId: get_training_job_artifacts_v1_post_training_job_artifacts_get
deprecated: true
parameters:
- name: job_uuid
in: query
required: true
schema:
type: string
description: The UUID of the job to get the artifacts of
title: Job Uuid
description: The UUID of the job to get the artifacts of
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PostTrainingJobArtifactsResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/post-training/job/cancel:
post:
tags:
- Post Training
summary: Cancel a training job
description: Cancel a training job
operationId: cancel_training_job_v1_post_training_job_cancel_post
deprecated: true
parameters:
- name: job_uuid
in: query
required: true
schema:
type: string
description: The UUID of the job to cancel
title: Job Uuid
description: The UUID of the job to cancel
responses:
'204':
description: Successful Response
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/post-training/job/status:
get:
tags:
- Post Training
summary: Get the status of a training job
description: Get the status of a training job
operationId: get_training_job_status_v1_post_training_job_status_get
deprecated: true
parameters:
- name: job_uuid
in: query
required: true
schema:
type: string
description: The UUID of the job to get the status of
title: Job Uuid
description: The UUID of the job to get the status of
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PostTrainingJobStatusResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/post-training/jobs:
get:
tags:
- Post Training
summary: Get all training jobs
description: Get all training jobs
operationId: get_training_jobs_v1_post_training_jobs_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ListPostTrainingJobsResponse'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
deprecated: true
/v1/post-training/preference-optimize:
post:
tags:
- Post Training
summary: Run preference optimization of a model
description: Run preference optimization of a model
operationId: preference_optimize_v1_post_training_preference_optimize_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PreferenceOptimizeRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PostTrainingJob'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
deprecated: true
/v1/post-training/supervised-fine-tune:
post:
tags:
- Post Training
summary: Run supervised fine-tuning of a model
description: Run supervised fine-tuning of a model
operationId: supervised_fine_tune_v1_post_training_supervised_fine_tune_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SupervisedFineTuneRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PostTrainingJob'
'400':
description: The request was invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: The client has sent too many requests in a given amount of time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The server encountered an unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
deprecated: true
components:
schemas:
Agent:
properties:
agent_id:
type: string
title: Agent Id
description: Unique identifier for the agent
agent_config:
$ref: '#/components/schemas/AgentConfig-Output'
description: Configuration settings for the agent
created_at:
type: string
format: date-time
title: Created At
description: Timestamp when the agent was created
type: object
required:
- agent_id
- agent_config
- created_at
title: Agent
description: An agent instance with configuration and metadata.
AgentCandidate:
properties:
type:
type: string
const: agent
title: Type
description: The type of candidate.
default: agent
config:
$ref: '#/components/schemas/AgentConfig-Input'
description: The configuration for the agent candidate.
type: object
required:
- config
title: AgentCandidate
description: An agent candidate for evaluation.
AgentConfig-Input:
properties:
sampling_params:
anyOf:
- $ref: '#/components/schemas/SamplingParams'
- type: 'null'
input_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Input Shields
output_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Output Shields
toolgroups:
anyOf:
- items:
anyOf:
- type: string
- $ref: '#/components/schemas/AgentToolGroupWithArgs'
type: array
- type: 'null'
title: Toolgroups
client_tools:
anyOf:
- items:
$ref: '#/components/schemas/ToolDef'
type: array
- type: 'null'
title: Client Tools
tool_choice:
anyOf:
- $ref: '#/components/schemas/ToolChoice'
- type: 'null'
deprecated: true
tool_prompt_format:
anyOf:
- $ref: '#/components/schemas/ToolPromptFormat'
- type: 'null'
deprecated: true
tool_config:
anyOf:
- $ref: '#/components/schemas/ToolConfig'
- type: 'null'
max_infer_iters:
anyOf:
- type: integer
- type: 'null'
title: Max Infer Iters
default: 10
model:
type: string
title: Model
description: The model identifier to use for the agent
instructions:
type: string
title: Instructions
description: The system instructions for the agent
name:
anyOf:
- type: string
- type: 'null'
title: Name
description: Optional name for the agent, used in telemetry and identification
enable_session_persistence:
anyOf:
- type: boolean
- type: 'null'
title: Enable Session Persistence
description: Optional flag indicating whether session data has to be persisted
default: false
response_format:
anyOf:
- oneOf:
- $ref: '#/components/schemas/JsonSchemaResponseFormat'
- $ref: '#/components/schemas/GrammarResponseFormat'
discriminator:
propertyName: type
mapping:
grammar: '#/components/schemas/GrammarResponseFormat'
json_schema: '#/components/schemas/JsonSchemaResponseFormat'
- type: 'null'
title: Response Format
description: Optional response format configuration
type: object
required:
- model
- instructions
title: AgentConfig
description: Configuration for an agent.
AgentConfig-Output:
properties:
sampling_params:
anyOf:
- $ref: '#/components/schemas/SamplingParams'
- type: 'null'
input_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Input Shields
output_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Output Shields
toolgroups:
anyOf:
- items:
anyOf:
- type: string
- $ref: '#/components/schemas/AgentToolGroupWithArgs'
type: array
- type: 'null'
title: Toolgroups
client_tools:
anyOf:
- items:
$ref: '#/components/schemas/ToolDef'
type: array
- type: 'null'
title: Client Tools
tool_choice:
anyOf:
- $ref: '#/components/schemas/ToolChoice'
- type: 'null'
deprecated: true
tool_prompt_format:
anyOf:
- $ref: '#/components/schemas/ToolPromptFormat'
- type: 'null'
deprecated: true
tool_config:
anyOf:
- $ref: '#/components/schemas/ToolConfig'
- type: 'null'
max_infer_iters:
anyOf:
- type: integer
- type: 'null'
title: Max Infer Iters
default: 10
model:
type: string
title: Model
description: The model identifier to use for the agent
instructions:
type: string
title: Instructions
description: The system instructions for the agent
name:
anyOf:
- type: string
- type: 'null'
title: Name
description: Optional name for the agent, used in telemetry and identification
enable_session_persistence:
anyOf:
- type: boolean
- type: 'null'
title: Enable Session Persistence
description: Optional flag indicating whether session data has to be persisted
default: false
response_format:
anyOf:
- oneOf:
- $ref: '#/components/schemas/JsonSchemaResponseFormat'
- $ref: '#/components/schemas/GrammarResponseFormat'
discriminator:
propertyName: type
mapping:
grammar: '#/components/schemas/GrammarResponseFormat'
json_schema: '#/components/schemas/JsonSchemaResponseFormat'
- type: 'null'
title: Response Format
description: Optional response format configuration
type: object
required:
- model
- instructions
title: AgentConfig
description: Configuration for an agent.
AgentCreateResponse:
properties:
agent_id:
type: string
title: Agent Id
description: Unique identifier for the created agent
type: object
required:
- agent_id
title: AgentCreateResponse
description: Response returned when creating a new agent.
AgentSessionCreateResponse:
properties:
session_id:
type: string
title: Session Id
description: Unique identifier for the created session
type: object
required:
- session_id
title: AgentSessionCreateResponse
description: Response returned when creating a new agent session.
AgentStepResponse:
properties:
step:
oneOf:
- $ref: '#/components/schemas/InferenceStep-Output'
- $ref: '#/components/schemas/ToolExecutionStep-Output'
- $ref: '#/components/schemas/ShieldCallStep-Output'
- $ref: '#/components/schemas/MemoryRetrievalStep-Output'
title: Step
description: The complete step data and execution details
discriminator:
propertyName: step_type
mapping:
inference: '#/components/schemas/InferenceStep-Output'
memory_retrieval: '#/components/schemas/MemoryRetrievalStep-Output'
shield_call: '#/components/schemas/ShieldCallStep-Output'
tool_execution: '#/components/schemas/ToolExecutionStep-Output'
type: object
required:
- step
title: AgentStepResponse
description: Response containing details of a specific agent step.
AgentToolGroupWithArgs:
properties:
name:
type: string
title: Name
args:
additionalProperties: true
type: object
title: Args
type: object
required:
- name
- args
title: AgentToolGroupWithArgs
AgentTurnCreateRequest:
properties:
sampling_params:
anyOf:
- $ref: '#/components/schemas/SamplingParams'
- type: 'null'
input_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Input Shields
output_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Output Shields
toolgroups:
anyOf:
- items:
anyOf:
- type: string
- $ref: '#/components/schemas/AgentToolGroupWithArgs'
type: array
- type: 'null'
title: Toolgroups
description: List of tool groups to make available for this turn
client_tools:
anyOf:
- items:
$ref: '#/components/schemas/ToolDef'
type: array
- type: 'null'
title: Client Tools
tool_choice:
anyOf:
- $ref: '#/components/schemas/ToolChoice'
- type: 'null'
deprecated: true
tool_prompt_format:
anyOf:
- $ref: '#/components/schemas/ToolPromptFormat'
- type: 'null'
deprecated: true
tool_config:
anyOf:
- $ref: '#/components/schemas/ToolConfig'
- type: 'null'
description: Tool configuration to override agent defaults
max_infer_iters:
anyOf:
- type: integer
- type: 'null'
title: Max Infer Iters
default: 10
instructions:
anyOf:
- type: string
- type: 'null'
title: Instructions
agent_id:
type: string
title: Agent Id
description: Unique identifier for the agent
session_id:
type: string
title: Session Id
description: Unique identifier for the conversation session
messages:
items:
anyOf:
- $ref: '#/components/schemas/UserMessage-Input'
- $ref: '#/components/schemas/ToolResponseMessage-Input'
type: array
title: Messages
description: List of messages to start the turn with
documents:
anyOf:
- items:
$ref: '#/components/schemas/Document'
type: array
- type: 'null'
title: Documents
description: List of documents to provide to the agent
stream:
anyOf:
- type: boolean
- type: 'null'
title: Stream
description: Whether to stream the response
default: false
type: object
required:
- agent_id
- session_id
- messages
title: AgentTurnCreateRequest
description: Request to create a new turn for an agent.
AgentTurnInputType:
properties:
type:
type: string
const: agent_turn_input
title: Type
default: agent_turn_input
type: object
title: AgentTurnInputType
description: "Parameter type for agent turn input.\n\n:param type: Discriminator type. Always \"agent_turn_input\""
AgentTurnResumeRequest:
properties:
agent_id:
type: string
title: Agent Id
description: Unique identifier for the agent
session_id:
type: string
title: Session Id
description: Unique identifier for the conversation session
turn_id:
type: string
title: Turn Id
description: Unique identifier for the turn within a session
tool_responses:
items:
$ref: '#/components/schemas/ToolResponse-Input'
type: array
title: Tool Responses
description: List of tool responses to submit to continue the turn
stream:
anyOf:
- type: boolean
- type: 'null'
title: Stream
description: Whether to stream the response
default: false
type: object
required:
- agent_id
- session_id
- turn_id
- tool_responses
title: AgentTurnResumeRequest
description: Request to resume an agent turn with tool responses.
AggregationFunctionType:
type: string
enum:
- average
- weighted_average
- median
- categorical_count
- accuracy
title: AggregationFunctionType
description: Types of aggregation functions for scoring results.
AllowedToolsFilter:
properties:
tool_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Tool Names
description: List of specific tool names that are allowed
type: object
title: AllowedToolsFilter
description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed"
ApprovalFilter:
properties:
always:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Always
description: List of tool names that always require approval
never:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Never
description: List of tool names that never require approval
type: object
title: ApprovalFilter
description: "Filter configuration for MCP tool approval requirements.\n\n:param always: (Optional) List of tool names that always require approval\n:param never: (Optional) List of tool names that never require approval"
ArrayType:
properties:
type:
type: string
const: array
title: Type
default: array
type: object
title: ArrayType
description: "Parameter type for array values.\n\n:param type: Discriminator type. Always \"array\""
Attachment-Input:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
title: Content
description: The content of the attachment.
mime_type:
type: string
title: Mime Type
description: The MIME type of the attachment.
type: object
required:
- content
- mime_type
title: Attachment
description: An attachment to an agent turn.
Attachment-Output:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
title: Content
description: The content of the attachment.
mime_type:
type: string
title: Mime Type
description: The MIME type of the attachment.
type: object
required:
- content
- mime_type
title: Attachment
description: An attachment to an agent turn.
BasicScoringFnParams:
properties:
type:
type: string
const: basic
title: Type
default: basic
aggregation_functions:
items:
$ref: '#/components/schemas/AggregationFunctionType'
type: array
title: Aggregation Functions
description: Aggregation functions to apply to the scores of each row
type: object
title: BasicScoringFnParams
description: Parameters for basic scoring function configuration.
Batch:
properties:
id:
type: string
title: Id
completion_window:
type: string
title: Completion Window
created_at:
type: integer
title: Created At
endpoint:
type: string
title: Endpoint
input_file_id:
type: string
title: Input File Id
object:
type: string
const: batch
title: Object
status:
type: string
enum:
- validating
- failed
- in_progress
- finalizing
- completed
- expired
- cancelling
- cancelled
title: Status
cancelled_at:
anyOf:
- type: integer
- type: 'null'
title: Cancelled At
cancelling_at:
anyOf:
- type: integer
- type: 'null'
title: Cancelling At
completed_at:
anyOf:
- type: integer
- type: 'null'
title: Completed At
error_file_id:
anyOf:
- type: string
- type: 'null'
title: Error File Id
errors:
anyOf:
- $ref: '#/components/schemas/Errors'
- type: 'null'
expired_at:
anyOf:
- type: integer
- type: 'null'
title: Expired At
expires_at:
anyOf:
- type: integer
- type: 'null'
title: Expires At
failed_at:
anyOf:
- type: integer
- type: 'null'
title: Failed At
finalizing_at:
anyOf:
- type: integer
- type: 'null'
title: Finalizing At
in_progress_at:
anyOf:
- type: integer
- type: 'null'
title: In Progress At
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Metadata
model:
anyOf:
- type: string
- type: 'null'
title: Model
output_file_id:
anyOf:
- type: string
- type: 'null'
title: Output File Id
request_counts:
anyOf:
- $ref: '#/components/schemas/BatchRequestCounts'
- type: 'null'
usage:
anyOf:
- $ref: '#/components/schemas/BatchUsage'
- type: 'null'
additionalProperties: true
type: object
required:
- id
- completion_window
- created_at
- endpoint
- input_file_id
- object
- status
title: Batch
BatchError:
properties:
code:
anyOf:
- type: string
- type: 'null'
title: Code
line:
anyOf:
- type: integer
- type: 'null'
title: Line
message:
anyOf:
- type: string
- type: 'null'
title: Message
param:
anyOf:
- type: string
- type: 'null'
title: Param
additionalProperties: true
type: object
title: BatchError
BatchRequestCounts:
properties:
completed:
type: integer
title: Completed
failed:
type: integer
title: Failed
total:
type: integer
title: Total
additionalProperties: true
type: object
required:
- completed
- failed
- total
title: BatchRequestCounts
BatchUsage:
properties:
input_tokens:
type: integer
title: Input Tokens
input_tokens_details:
$ref: '#/components/schemas/InputTokensDetails'
output_tokens:
type: integer
title: Output Tokens
output_tokens_details:
$ref: '#/components/schemas/OutputTokensDetails'
total_tokens:
type: integer
title: Total Tokens
additionalProperties: true
type: object
required:
- input_tokens
- input_tokens_details
- output_tokens
- output_tokens_details
- total_tokens
title: BatchUsage
Benchmark:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for this resource in llama stack
provider_resource_id:
anyOf:
- type: string
- type: 'null'
title: Provider Resource Id
description: Unique identifier for this resource in the provider
provider_id:
type: string
title: Provider Id
description: ID of the provider that owns this resource
type:
type: string
const: benchmark
title: Type
description: The resource type, always benchmark
default: benchmark
dataset_id:
type: string
title: Dataset Id
description: The ID of the dataset to use for the benchmark
scoring_functions:
items:
type: string
type: array
title: Scoring Functions
description: The scoring functions to use for the benchmark
metadata:
additionalProperties: true
type: object
title: Metadata
description: Metadata for this evaluation task
type: object
required:
- identifier
- provider_id
- dataset_id
- scoring_functions
title: Benchmark
description: A benchmark resource for evaluating model performance.
BenchmarkConfig:
properties:
eval_candidate:
oneOf:
- $ref: '#/components/schemas/ModelCandidate'
- $ref: '#/components/schemas/AgentCandidate'
title: Eval Candidate
description: The candidate to evaluate.
discriminator:
propertyName: type
mapping:
agent: '#/components/schemas/AgentCandidate'
model: '#/components/schemas/ModelCandidate'
scoring_params:
additionalProperties:
oneOf:
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
- $ref: '#/components/schemas/RegexParserScoringFnParams'
- $ref: '#/components/schemas/BasicScoringFnParams'
discriminator:
propertyName: type
mapping:
basic: '#/components/schemas/BasicScoringFnParams'
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
type: object
title: Scoring Params
description: Map between scoring function id and parameters for each scoring function you want to run.
num_examples:
anyOf:
- type: integer
- type: 'null'
title: Num Examples
description: The number of examples to evaluate. If not provided, all examples in the dataset will be evaluated.
type: object
required:
- eval_candidate
title: BenchmarkConfig
description: A benchmark configuration for evaluation.
Body_openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post:
properties:
file_id:
type: string
title: File Id
description: The ID of the file to attach to the vector store.
attributes:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Attributes
description: The key-value attributes stored with the file, which can be used for filtering.
chunking_strategy:
anyOf:
- oneOf:
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
discriminator:
propertyName: type
mapping:
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
- type: 'null'
title: Chunking Strategy
description: The chunking strategy to use for the file.
type: object
required:
- file_id
title: Body_openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post
Body_openai_search_vector_store_v1_vector_stores__vector_store_id__search_post:
properties:
query:
anyOf:
- type: string
- items:
type: string
type: array
title: Query
description: The query string or array for performing the search.
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Filters
description: Filters based on file attributes to narrow the search results.
max_num_results:
anyOf:
- type: integer
maximum: 50.0
minimum: 1.0
- type: 'null'
title: Max Num Results
description: Maximum number of results to return (1 to 50 inclusive, default 10).
default: 10
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Ranking options for fine-tuning the search results.
rewrite_query:
type: boolean
title: Rewrite Query
description: Whether to rewrite the natural language query for vector search (default false).
default: false
search_mode:
anyOf:
- type: string
- type: 'null'
title: Search Mode
description: The search mode to use - 'keyword', 'vector', or 'hybrid' (default 'vector').
default: vector
type: object
required:
- query
title: Body_openai_search_vector_store_v1_vector_stores__vector_store_id__search_post
Body_openai_upload_file_v1_files_post:
properties:
file:
type: string
format: binary
title: File
description: The File object to be uploaded.
purpose:
$ref: '#/components/schemas/OpenAIFilePurpose'
description: The intended purpose of the uploaded file.
expires_after:
anyOf:
- $ref: '#/components/schemas/ExpiresAfter'
- type: 'null'
description: Optional form values describing expiration for the file.
type: object
required:
- file
- purpose
title: Body_openai_upload_file_v1_files_post
Body_rag_tool_insert_v1_tool_runtime_rag_tool_insert_post:
properties:
documents:
items:
$ref: '#/components/schemas/RAGDocument'
type: array
title: Documents
description: List of documents to index in the RAG system.
vector_store_id:
type: string
title: Vector Store Id
description: ID of the vector database to store the document embeddings.
chunk_size_in_tokens:
type: integer
title: Chunk Size In Tokens
description: Size in tokens for document chunking during indexing.
default: 512
type: object
required:
- documents
- vector_store_id
title: Body_rag_tool_insert_v1_tool_runtime_rag_tool_insert_post
Body_rag_tool_query_v1_tool_runtime_rag_tool_query_post:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
description: The query content to search for in the indexed documents.
vector_store_ids:
items:
type: string
type: array
title: Vector Store Ids
description: List of vector database IDs to search within.
query_config:
anyOf:
- $ref: '#/components/schemas/RAGQueryConfig'
- type: 'null'
description: Configuration parameters for the query operation.
type: object
required:
- content
- vector_store_ids
title: Body_rag_tool_query_v1_tool_runtime_rag_tool_query_post
Body_rerank_v1alpha_inference_rerank_post:
properties:
model:
type: string
title: Model
description: The identifier of the reranking model to use.
query:
anyOf:
- type: string
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
title: Query
description: The search query to rank items against.
items:
items:
anyOf:
- type: string
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
type: array
title: Items
description: List of items to rerank.
max_num_results:
anyOf:
- type: integer
- type: 'null'
title: Max Num Results
description: 'Maximum number of results to return. Default: returns all.'
type: object
required:
- model
- query
- items
title: Body_rerank_v1alpha_inference_rerank_post
BooleanType:
properties:
type:
type: string
const: boolean
title: Type
default: boolean
type: object
title: BooleanType
description: "Parameter type for boolean values.\n\n:param type: Discriminator type. Always \"boolean\""
BuiltinTool:
type: string
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
ChatCompletionInputType:
properties:
type:
type: string
const: chat_completion_input
title: Type
default: chat_completion_input
type: object
title: ChatCompletionInputType
description: "Parameter type for chat completion input.\n\n:param type: Discriminator type. Always \"chat_completion_input\""
Checkpoint:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for the checkpoint.
created_at:
type: string
format: date-time
title: Created At
description: Timestamp when the checkpoint was created.
epoch:
type: integer
title: Epoch
description: Training epoch when the checkpoint was saved.
post_training_job_id:
type: string
title: Post Training Job Id
description: Identifier of the training job that created this checkpoint.
path:
type: string
title: Path
description: File system path where the checkpoint is stored.
training_metrics:
anyOf:
- $ref: '#/components/schemas/PostTrainingMetric'
- type: 'null'
description: Training metrics associated with this checkpoint.
type: object
required:
- identifier
- created_at
- epoch
- post_training_job_id
- path
- training_metrics
title: Checkpoint
description: Checkpoint created during training runs.
Chunk-Input:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
chunk_id:
type: string
title: Chunk Id
metadata:
additionalProperties: true
type: object
title: Metadata
embedding:
anyOf:
- items:
type: number
type: array
- type: 'null'
title: Embedding
chunk_metadata:
anyOf:
- $ref: '#/components/schemas/ChunkMetadata'
- type: 'null'
type: object
required:
- content
- chunk_id
title: Chunk
description: A chunk of content that can be inserted into a vector database.
Chunk-Output:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
chunk_id:
type: string
title: Chunk Id
metadata:
additionalProperties: true
type: object
title: Metadata
embedding:
anyOf:
- items:
type: number
type: array
- type: 'null'
title: Embedding
chunk_metadata:
anyOf:
- $ref: '#/components/schemas/ChunkMetadata'
- type: 'null'
type: object
required:
- content
- chunk_id
title: Chunk
description: A chunk of content that can be inserted into a vector database.
ChunkMetadata:
properties:
chunk_id:
anyOf:
- type: string
- type: 'null'
title: Chunk Id
document_id:
anyOf:
- type: string
- type: 'null'
title: Document Id
source:
anyOf:
- type: string
- type: 'null'
title: Source
created_timestamp:
anyOf:
- type: integer
- type: 'null'
title: Created Timestamp
updated_timestamp:
anyOf:
- type: integer
- type: 'null'
title: Updated Timestamp
chunk_window:
anyOf:
- type: string
- type: 'null'
title: Chunk Window
chunk_tokenizer:
anyOf:
- type: string
- type: 'null'
title: Chunk Tokenizer
chunk_embedding_model:
anyOf:
- type: string
- type: 'null'
title: Chunk Embedding Model
chunk_embedding_dimension:
anyOf:
- type: integer
- type: 'null'
title: Chunk Embedding Dimension
content_token_count:
anyOf:
- type: integer
- type: 'null'
title: Content Token Count
metadata_token_count:
anyOf:
- type: integer
- type: 'null'
title: Metadata Token Count
type: object
title: ChunkMetadata
description: "`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that\n will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata`\n is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after.\n Use `Chunk.metadata` for metadata that will be used in the context during inference."
CompletionInputType:
properties:
type:
type: string
const: completion_input
title: Type
default: completion_input
type: object
title: CompletionInputType
description: "Parameter type for completion input.\n\n:param type: Discriminator type. Always \"completion_input\""
CompletionMessage-Input:
properties:
role:
type: string
const: assistant
title: Role
default: assistant
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
type: object
required:
- content
- stop_reason
title: CompletionMessage
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
CompletionMessage-Output:
properties:
role:
type: string
const: assistant
title: Role
default: assistant
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
type: object
required:
- content
- stop_reason
title: CompletionMessage
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
Conversation:
properties:
id:
type: string
title: Id
description: The unique ID of the conversation.
object:
type: string
const: conversation
title: Object
description: The object type, which is always conversation.
default: conversation
created_at:
type: integer
title: Created At
description: The time at which the conversation was created, measured in seconds since the Unix epoch.
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Metadata
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.
items:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
title: Items
description: Initial items to include in the conversation context. You may add up to 20 items at a time.
type: object
required:
- id
- created_at
title: Conversation
description: OpenAI-compatible conversation object.
ConversationCreateRequest:
properties:
items:
anyOf:
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Input'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Input'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
type: array
maxItems: 20
- type: 'null'
title: Items
description: Initial items to include in the conversation context. You may add up to 20 items at a time.
default: []
metadata:
anyOf:
- additionalProperties:
type: string
type: object
maxProperties: 16
- type: 'null'
title: Metadata
description: Set of 16 key-value pairs that can be attached to an object. Useful for storing additional information
default: {}
type: object
title: ConversationCreateRequest
description: Request body for creating a conversation.
ConversationDeletedResource:
properties:
id:
type: string
title: Id
description: The deleted conversation identifier
object:
type: string
title: Object
description: Object type
default: conversation.deleted
deleted:
type: boolean
title: Deleted
description: Whether the object was deleted
default: true
type: object
required:
- id
title: ConversationDeletedResource
description: Response for deleted conversation.
ConversationItemCreateRequest:
properties:
items:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Input'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Input'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
type: array
maxItems: 20
title: Items
description: Items to include in the conversation context. You may add up to 20 items at a time.
type: object
required:
- items
title: ConversationItemCreateRequest
description: Request body for creating conversation items.
ConversationItemDeletedResource:
properties:
id:
type: string
title: Id
description: The deleted item identifier
object:
type: string
title: Object
description: Object type
default: conversation.item.deleted
deleted:
type: boolean
title: Deleted
description: Whether the object was deleted
default: true
type: object
required:
- id
title: ConversationItemDeletedResource
description: Response for deleted conversation item.
ConversationItemInclude:
type: string
enum:
- web_search_call.action.sources
- code_interpreter_call.outputs
- computer_call_output.output.image_url
- file_search_call.results
- message.input_image.image_url
- message.output_text.logprobs
- reasoning.encrypted_content
title: ConversationItemInclude
description: Specify additional output data to include in the model response.
ConversationItemList:
properties:
object:
type: string
title: Object
description: Object type
default: list
data:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Output'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
type: array
title: Data
description: List of conversation items
first_id:
anyOf:
- type: string
- type: 'null'
title: First Id
description: The ID of the first item in the list
last_id:
anyOf:
- type: string
- type: 'null'
title: Last Id
description: The ID of the last item in the list
has_more:
type: boolean
title: Has More
description: Whether there are more items available
default: false
type: object
required:
- data
title: ConversationItemList
description: List of conversation items with pagination.
ConversationUpdateRequest:
properties:
metadata:
additionalProperties:
type: string
type: object
title: Metadata
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.
type: object
required:
- metadata
title: ConversationUpdateRequest
description: Request body for updating a conversation.
CreateAgentSessionRequest:
properties:
agent_id:
type: string
title: Agent Id
description: The ID of the agent to create the session for
session_name:
type: string
title: Session Name
description: The name of the session to create
type: object
required:
- agent_id
- session_name
title: CreateAgentSessionRequest
description: Request to create a new session for an agent.
CreateBatchRequest:
properties:
input_file_id:
type: string
title: Input File Id
description: The ID of an uploaded file containing requests for the batch.
endpoint:
type: string
title: Endpoint
description: The endpoint to be used for all requests in the batch.
completion_window:
type: string
const: 24h
title: Completion Window
description: The time window within which the batch should be processed.
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Metadata
description: Optional metadata for the batch.
idempotency_key:
anyOf:
- type: string
- type: 'null'
title: Idempotency Key
description: Optional idempotency key. When provided, enables idempotent behavior.
type: object
required:
- input_file_id
- endpoint
- completion_window
title: CreateBatchRequest
description: Request model for creating a batch.
CreateOpenAIResponseRequest:
properties:
input:
anyOf:
- type: string
- items:
anyOf:
- oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Input'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Input'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseMessage-Input'
type: array
title: Input
description: Input message(s) to create the response
model:
type: string
title: Model
description: The underlying LLM used for completions
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Prompt object with ID, version, and variables
instructions:
anyOf:
- type: string
- type: 'null'
title: Instructions
description: System instructions
previous_response_id:
anyOf:
- type: string
- type: 'null'
title: Previous Response Id
description: If specified, the new response will be a continuation of the previous response
conversation:
anyOf:
- type: string
- type: 'null'
title: Conversation
description: The ID of a conversation to add the response to. Must begin with 'conv_'
store:
type: boolean
title: Store
description: Whether to store the response
default: true
stream:
type: boolean
title: Stream
description: Whether to stream the response
default: false
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
description: Sampling temperature
text:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseText'
- type: 'null'
description: Text generation parameters
tools:
anyOf:
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseInputToolMCP'
discriminator:
propertyName: type
mapping:
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
function: '#/components/schemas/OpenAIResponseInputToolFunction'
mcp: '#/components/schemas/OpenAIResponseInputToolMCP'
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch'
type: array
- type: 'null'
title: Tools
description: Tools to make available
include:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Include
description: Additional fields to include in the response
max_infer_iters:
type: integer
title: Max Infer Iters
description: Maximum number of inference iterations (extension to the OpenAI API)
default: 10
guardrails:
anyOf:
- items:
anyOf:
- type: string
- $ref: '#/components/schemas/ResponseGuardrailSpec'
type: array
- type: 'null'
title: Guardrails
description: List of guardrails to apply during response generation
type: object
required:
- input
- model
title: CreateOpenAIResponseRequest
description: Request to create a model response.
CreatePromptRequest:
properties:
prompt:
type: string
title: Prompt
description: The prompt text content with variable placeholders.
variables:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Variables
description: List of variable names that can be used in the prompt template.
type: object
required:
- prompt
title: CreatePromptRequest
description: Request model for creating a new prompt.
DPOAlignmentConfig:
properties:
beta:
type: number
title: Beta
loss_type:
$ref: '#/components/schemas/DPOLossType'
default: sigmoid
type: object
required:
- beta
title: DPOAlignmentConfig
description: Configuration for Direct Preference Optimization (DPO) alignment.
DPOLossType:
type: string
enum:
- sigmoid
- hinge
- ipo
- kto_pair
title: DPOLossType
DataConfig:
properties:
dataset_id:
type: string
title: Dataset Id
batch_size:
type: integer
title: Batch Size
shuffle:
type: boolean
title: Shuffle
data_format:
$ref: '#/components/schemas/DatasetFormat'
validation_dataset_id:
anyOf:
- type: string
- type: 'null'
title: Validation Dataset Id
packed:
anyOf:
- type: boolean
- type: 'null'
title: Packed
default: false
train_on_input:
anyOf:
- type: boolean
- type: 'null'
title: Train On Input
default: false
type: object
required:
- dataset_id
- batch_size
- shuffle
- data_format
title: DataConfig
description: Configuration for training data and data loading.
Dataset:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for this resource in llama stack
provider_resource_id:
anyOf:
- type: string
- type: 'null'
title: Provider Resource Id
description: Unique identifier for this resource in the provider
provider_id:
type: string
title: Provider Id
description: ID of the provider that owns this resource
type:
type: string
const: dataset
title: Type
description: Type of resource, always 'dataset' for datasets
default: dataset
purpose:
$ref: '#/components/schemas/DatasetPurpose'
source:
oneOf:
- $ref: '#/components/schemas/URIDataSource'
- $ref: '#/components/schemas/RowsDataSource'
title: Source
discriminator:
propertyName: type
mapping:
rows: '#/components/schemas/RowsDataSource'
uri: '#/components/schemas/URIDataSource'
metadata:
additionalProperties: true
type: object
title: Metadata
description: Any additional metadata for this dataset
type: object
required:
- identifier
- provider_id
- purpose
- source
title: Dataset
description: Dataset resource for storing and accessing training or evaluation data.
DatasetFormat:
type: string
enum:
- instruct
- dialog
title: DatasetFormat
description: Format of the training dataset.
DatasetPurpose:
type: string
enum:
- post-training/messages
- eval/question-answer
- eval/messages-answer
title: DatasetPurpose
description: "Purpose of the dataset. Each purpose has a required input data schema.\n\n {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Hello, world!\"},\n {\"role\": \"assistant\", \"content\": \"Hello, world!\"},\n ]\n }\n {\n \"question\": \"What is the capital of France?\",\n \"answer\": \"Paris\"\n }\n {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Hello, my name is John Doe.\"},\n {\"role\": \"assistant\", \"content\": \"Hello, John Doe. How can I help you today?\"},\n {\"role\": \"user\", \"content\": \"What's my name?\"},\n ],\n \"answer\": \"John Doe\"\n }"
DefaultRAGQueryGeneratorConfig:
properties:
type:
type: string
const: default
title: Type
default: default
separator:
type: string
title: Separator
default: ' '
type: object
title: DefaultRAGQueryGeneratorConfig
description: "Configuration for the default RAG query generator.\n\n:param type: Type of query generator, always 'default'\n:param separator: String separator used to join query terms"
Document:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
title: Content
description: The content of the document.
mime_type:
type: string
title: Mime Type
description: The MIME type of the document.
type: object
required:
- content
- mime_type
title: Document
description: A document to be used by an agent.
EfficiencyConfig:
properties:
enable_activation_checkpointing:
anyOf:
- type: boolean
- type: 'null'
title: Enable Activation Checkpointing
default: false
enable_activation_offloading:
anyOf:
- type: boolean
- type: 'null'
title: Enable Activation Offloading
default: false
memory_efficient_fsdp_wrap:
anyOf:
- type: boolean
- type: 'null'
title: Memory Efficient Fsdp Wrap
default: false
fsdp_cpu_offload:
anyOf:
- type: boolean
- type: 'null'
title: Fsdp Cpu Offload
default: false
type: object
title: EfficiencyConfig
description: Configuration for memory and compute efficiency optimizations.
Error:
properties:
status:
type: integer
title: Status
description: HTTP status code
title:
type: string
title: Title
description: Error title, a short summary of the error which is invariant for an error type
detail:
type: string
title: Detail
description: Error detail, a longer human-readable description of the error
instance:
anyOf:
- type: string
- type: 'null'
title: Instance
description: (Optional) A URL which can be used to retrieve more information about the specific occurrence of the error
type: object
required:
- status
- title
- detail
title: Error
description: Error response from the API. Roughly follows RFC 7807.
Errors:
properties:
data:
anyOf:
- items:
$ref: '#/components/schemas/BatchError'
type: array
- type: 'null'
title: Data
object:
anyOf:
- type: string
- type: 'null'
title: Object
additionalProperties: true
type: object
title: Errors
EvaluateResponse:
properties:
generations:
items:
additionalProperties: true
type: object
type: array
title: Generations
description: The generations from the evaluation.
scores:
additionalProperties:
$ref: '#/components/schemas/ScoringResult'
type: object
title: Scores
description: The scores from the evaluation. Each key in the dict is a scoring function name.
type: object
required:
- generations
- scores
title: EvaluateResponse
description: The response from an evaluation.
EvaluateRowsRequest:
properties:
input_rows:
items:
additionalProperties: true
type: object
type: array
title: Input Rows
description: The rows to evaluate.
scoring_functions:
items:
type: string
type: array
title: Scoring Functions
description: The scoring functions to use for the evaluation.
benchmark_config:
$ref: '#/components/schemas/BenchmarkConfig'
description: The configuration for the benchmark.
type: object
required:
- input_rows
- scoring_functions
- benchmark_config
title: EvaluateRowsRequest
description: Request model for evaluating rows.
ExpiresAfter:
properties:
anchor:
type: string
const: created_at
title: Anchor
description: Anchor must be 'created_at'.
seconds:
type: integer
maximum: 2592000.0
minimum: 3600.0
title: Seconds
description: Seconds between 3600 and 2592000 (1 hour to 30 days).
type: object
required:
- anchor
- seconds
title: ExpiresAfter
description: Control expiration of uploaded files.
GrammarResponseFormat:
properties:
type:
type: string
const: grammar
title: Type
default: grammar
bnf:
additionalProperties: true
type: object
title: Bnf
type: object
required:
- bnf
title: GrammarResponseFormat
description: Configuration for grammar-guided response generation.
GreedySamplingStrategy:
properties:
type:
type: string
const: greedy
title: Type
default: greedy
type: object
title: GreedySamplingStrategy
description: Greedy sampling strategy that selects the highest probability token at each step.
HealthInfo:
properties:
status:
$ref: '#/components/schemas/HealthStatus'
description: Current health status of the service
type: object
required:
- status
title: HealthInfo
description: Health status information for the service.
HealthStatus:
type: string
enum:
- OK
- Error
- Not Implemented
title: HealthStatus
ImageContentItem-Input:
properties:
type:
type: string
const: image
title: Type
default: image
image:
$ref: '#/components/schemas/_URLOrData'
type: object
required:
- image
title: ImageContentItem
description: A image content item.
ImageContentItem-Output:
properties:
type:
type: string
const: image
title: Type
default: image
image:
$ref: '#/components/schemas/_URLOrData'
type: object
required:
- image
title: ImageContentItem
description: A image content item.
InferenceStep-Input:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: inference
title: Step Type
default: inference
model_response:
$ref: '#/components/schemas/CompletionMessage-Input'
description: The response from the LLM.
type: object
required:
- turn_id
- step_id
- model_response
title: InferenceStep
description: An inference step in an agent turn.
InferenceStep-Output:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: inference
title: Step Type
default: inference
model_response:
$ref: '#/components/schemas/CompletionMessage-Output'
description: The response from the LLM.
type: object
required:
- turn_id
- step_id
- model_response
title: InferenceStep
description: An inference step in an agent turn.
InputTokensDetails:
properties:
cached_tokens:
type: integer
title: Cached Tokens
additionalProperties: true
type: object
required:
- cached_tokens
title: InputTokensDetails
InsertChunksRequest:
properties:
vector_store_id:
type: string
title: Vector Store Id
description: The identifier of the vector database to insert the chunks into.
chunks:
items:
$ref: '#/components/schemas/Chunk-Input'
type: array
title: Chunks
description: The chunks to insert.
ttl_seconds:
anyOf:
- type: integer
- type: 'null'
title: Ttl Seconds
description: The time to live of the chunks.
type: object
required:
- vector_store_id
- chunks
title: InsertChunksRequest
description: Request to insert chunks into a vector database.
InvokeToolRequest:
properties:
tool_name:
type: string
title: Tool Name
description: The name of the tool to invoke
kwargs:
additionalProperties: true
type: object
title: Kwargs
description: A dictionary of arguments to pass to the tool
type: object
required:
- tool_name
- kwargs
title: InvokeToolRequest
description: Request model for invoking a tool.
Job:
properties:
job_id:
type: string
title: Job Id
status:
$ref: '#/components/schemas/JobStatus'
type: object
required:
- job_id
- status
title: Job
description: A job execution instance with status tracking.
JobStatus:
type: string
enum:
- completed
- in_progress
- failed
- scheduled
- cancelled
title: JobStatus
description: "Status of a job execution.\n:cvar completed: Job has finished successfully\n:cvar in_progress: Job is currently running\n:cvar failed: Job has failed during execution\n:cvar scheduled: Job is scheduled but not yet started\n:cvar cancelled: Job was cancelled before completion"
JsonSchemaResponseFormat:
properties:
type:
type: string
const: json_schema
title: Type
default: json_schema
json_schema:
additionalProperties: true
type: object
title: Json Schema
type: object
required:
- json_schema
title: JsonSchemaResponseFormat
description: Configuration for JSON schema-guided response generation.
JsonType:
properties:
type:
type: string
const: json
title: Type
default: json
type: object
title: JsonType
description: "Parameter type for JSON values.\n\n:param type: Discriminator type. Always \"json\""
LLMAsJudgeScoringFnParams:
properties:
type:
type: string
const: llm_as_judge
title: Type
default: llm_as_judge
judge_model:
type: string
title: Judge Model
prompt_template:
anyOf:
- type: string
- type: 'null'
title: Prompt Template
judge_score_regexes:
items:
type: string
type: array
title: Judge Score Regexes
description: Regexes to extract the answer from generated response
aggregation_functions:
items:
$ref: '#/components/schemas/AggregationFunctionType'
type: array
title: Aggregation Functions
description: Aggregation functions to apply to the scores of each row
type: object
required:
- judge_model
title: LLMAsJudgeScoringFnParams
description: Parameters for LLM-as-judge scoring function configuration.
LLMRAGQueryGeneratorConfig:
properties:
type:
type: string
const: llm
title: Type
default: llm
model:
type: string
title: Model
template:
type: string
title: Template
type: object
required:
- model
- template
title: LLMRAGQueryGeneratorConfig
description: "Configuration for the LLM-based RAG query generator.\n\n:param type: Type of query generator, always 'llm'\n:param model: Name of the language model to use for query generation\n:param template: Template string for formatting the query generation prompt"
ListBatchesResponse:
properties:
object:
type: string
const: list
title: Object
description: The object type, which is always 'list'.
default: list
data:
items:
$ref: '#/components/schemas/Batch'
type: array
title: Data
description: List of batch objects.
first_id:
anyOf:
- type: string
- type: 'null'
title: First Id
description: ID of the first batch in the list.
last_id:
anyOf:
- type: string
- type: 'null'
title: Last Id
description: ID of the last batch in the list.
has_more:
type: boolean
title: Has More
description: Whether there are more batches available.
default: false
type: object
required:
- data
title: ListBatchesResponse
description: Response containing a list of batch objects.
ListBenchmarksResponse:
properties:
data:
items:
$ref: '#/components/schemas/Benchmark'
type: array
title: Data
description: List of benchmark resources
type: object
required:
- data
title: ListBenchmarksResponse
description: Response model for listing benchmarks.
ListDatasetsResponse:
properties:
data:
items:
$ref: '#/components/schemas/Dataset'
type: array
title: Data
description: List of datasets
type: object
required:
- data
title: ListDatasetsResponse
description: Response from listing datasets.
ListModelsResponse:
properties:
data:
items:
$ref: '#/components/schemas/Model'
type: array
title: Data
description: List of model resources.
type: object
required:
- data
title: ListModelsResponse
description: Response model for listing models.
ListOpenAIChatCompletionResponse:
properties:
data:
items:
$ref: '#/components/schemas/OpenAICompletionWithInputMessages'
type: array
title: Data
has_more:
type: boolean
title: Has More
first_id:
type: string
title: First Id
last_id:
type: string
title: Last Id
object:
type: string
const: list
title: Object
default: list
type: object
required:
- data
- has_more
- first_id
- last_id
title: ListOpenAIChatCompletionResponse
description: Response from listing OpenAI-compatible chat completions.
ListOpenAIFileResponse:
properties:
data:
items:
$ref: '#/components/schemas/OpenAIFileObject'
type: array
title: Data
description: List of file objects.
has_more:
type: boolean
title: Has More
description: Whether there are more files available beyond this page.
first_id:
type: string
title: First Id
description: ID of the first file in the list for pagination.
last_id:
type: string
title: Last Id
description: ID of the last file in the list for pagination.
object:
type: string
const: list
title: Object
description: The object type, which is always 'list'.
default: list
type: object
required:
- data
- has_more
- first_id
- last_id
title: ListOpenAIFileResponse
description: Response for listing files in OpenAI Files API.
ListOpenAIResponseInputItem:
properties:
data:
items:
anyOf:
- oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Output'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
type: array
title: Data
description: List of input items
object:
type: string
const: list
title: Object
description: Object type identifier, always "list"
default: list
type: object
required:
- data
title: ListOpenAIResponseInputItem
description: "List container for OpenAI response input items.\n\n:param data: List of input items\n:param object: Object type identifier, always \"list\""
ListOpenAIResponseObject:
properties:
data:
items:
$ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output'
type: array
title: Data
description: List of response objects with their input context
has_more:
type: boolean
title: Has More
description: Whether there are more results available beyond this page
first_id:
type: string
title: First Id
description: Identifier of the first item in this page
last_id:
type: string
title: Last Id
description: Identifier of the last item in this page
object:
type: string
const: list
title: Object
description: Object type identifier, always "list"
default: list
type: object
required:
- data
- has_more
- first_id
- last_id
title: ListOpenAIResponseObject
description: "Paginated list of OpenAI response objects with navigation metadata.\n\n:param data: List of response objects with their input context\n:param has_more: Whether there are more results available beyond this page\n:param first_id: Identifier of the first item in this page\n:param last_id: Identifier of the last item in this page\n:param object: Object type identifier, always \"list\""
ListPostTrainingJobsResponse:
properties:
data:
items:
$ref: '#/components/schemas/PostTrainingJob'
type: array
title: Data
description: The list of training jobs
type: object
required:
- data
title: ListPostTrainingJobsResponse
ListPromptsResponse:
properties:
data:
items:
$ref: '#/components/schemas/Prompt'
type: array
title: Data
description: List of prompt resources.
type: object
required:
- data
title: ListPromptsResponse
description: Response model to list prompts.
ListProvidersResponse:
properties:
data:
items:
$ref: '#/components/schemas/ProviderInfo'
type: array
title: Data
description: List of provider information objects
type: object
required:
- data
title: ListProvidersResponse
description: Response containing a list of all available providers.
ListRoutesResponse:
properties:
data:
items:
$ref: '#/components/schemas/RouteInfo'
type: array
title: Data
description: List of available route information objects
type: object
required:
- data
title: ListRoutesResponse
description: Response containing a list of all available API routes.
ListScoringFunctionsResponse:
properties:
data:
items:
$ref: '#/components/schemas/ScoringFn'
type: array
title: Data
description: List of scoring function resources
type: object
required:
- data
title: ListScoringFunctionsResponse
description: Response model for listing scoring functions.
ListShieldsResponse:
properties:
data:
items:
$ref: '#/components/schemas/Shield'
type: array
title: Data
description: List of shield resources
type: object
required:
- data
title: ListShieldsResponse
description: Response model for listing shields.
ListToolDefsResponse:
properties:
data:
items:
$ref: '#/components/schemas/ToolDef'
type: array
title: Data
description: List of tool definitions
type: object
required:
- data
title: ListToolDefsResponse
description: Response containing a list of tool definitions.
ListToolGroupsResponse:
properties:
data:
items:
$ref: '#/components/schemas/ToolGroup'
type: array
title: Data
description: List of tool groups
type: object
required:
- data
title: ListToolGroupsResponse
description: Response containing a list of tool groups.
LoraFinetuningConfig:
properties:
type:
type: string
const: LoRA
title: Type
default: LoRA
lora_attn_modules:
items:
type: string
type: array
title: Lora Attn Modules
apply_lora_to_mlp:
type: boolean
title: Apply Lora To Mlp
apply_lora_to_output:
type: boolean
title: Apply Lora To Output
rank:
type: integer
title: Rank
alpha:
type: integer
title: Alpha
use_dora:
anyOf:
- type: boolean
- type: 'null'
title: Use Dora
default: false
quantize_base:
anyOf:
- type: boolean
- type: 'null'
title: Quantize Base
default: false
type: object
required:
- lora_attn_modules
- apply_lora_to_mlp
- apply_lora_to_output
- rank
- alpha
title: LoraFinetuningConfig
description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning.
MCPListToolsTool:
properties:
input_schema:
additionalProperties: true
type: object
title: Input Schema
description: JSON schema defining the tool's input parameters
name:
type: string
title: Name
description: Name of the tool
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Description of what the tool does
type: object
required:
- input_schema
- name
title: MCPListToolsTool
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
MemoryRetrievalStep-Input:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: memory_retrieval
title: Step Type
default: memory_retrieval
vector_store_ids:
type: string
title: Vector Store Ids
description: The IDs of the vector databases to retrieve context from.
inserted_context:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Inserted Context
description: The context retrieved from the vector databases.
type: object
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
description: A memory retrieval step in an agent turn.
MemoryRetrievalStep-Output:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: memory_retrieval
title: Step Type
default: memory_retrieval
vector_store_ids:
type: string
title: Vector Store Ids
description: The IDs of the vector databases to retrieve context from.
inserted_context:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
title: Inserted Context
description: The context retrieved from the vector databases.
type: object
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
description: A memory retrieval step in an agent turn.
Model:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for this resource in llama stack
provider_resource_id:
anyOf:
- type: string
- type: 'null'
title: Provider Resource Id
description: Unique identifier for this resource in the provider
provider_id:
type: string
title: Provider Id
description: ID of the provider that owns this resource
type:
type: string
const: model
title: Type
description: The resource type, always 'model' for model resources.
default: model
metadata:
additionalProperties: true
type: object
title: Metadata
description: Any additional metadata for this model.
model_type:
$ref: '#/components/schemas/ModelType'
description: The type of model (LLM or embedding model).
default: llm
type: object
required:
- identifier
- provider_id
title: Model
description: A model resource representing an AI model registered in Llama Stack.
ModelCandidate:
properties:
type:
type: string
const: model
title: Type
description: The type of candidate.
default: model
model:
type: string
title: Model
description: The model ID to evaluate.
sampling_params:
$ref: '#/components/schemas/SamplingParams'
description: The sampling parameters for the model.
system_message:
anyOf:
- $ref: '#/components/schemas/SystemMessage'
- type: 'null'
description: The system message providing instructions or context to the model.
type: object
required:
- model
- sampling_params
title: ModelCandidate
description: A model candidate for evaluation.
ModelType:
type: string
enum:
- llm
- embedding
- rerank
title: ModelType
description: Enumeration of supported model types in Llama Stack.
ModerationObject:
properties:
id:
type: string
title: Id
description: The unique identifier for the moderation request.
model:
type: string
title: Model
description: The model used to generate the moderation results.
results:
items:
$ref: '#/components/schemas/ModerationObjectResults'
type: array
title: Results
description: A list of moderation objects.
type: object
required:
- id
- model
- results
title: ModerationObject
description: A moderation object.
ModerationObjectResults:
properties:
flagged:
type: boolean
title: Flagged
description: Whether any of the below categories are flagged.
categories:
anyOf:
- additionalProperties:
type: boolean
type: object
- type: 'null'
title: Categories
description: A list of the categories, and whether they are flagged or not.
category_applied_input_types:
anyOf:
- additionalProperties:
items:
type: string
type: array
type: object
- type: 'null'
title: Category Applied Input Types
description: A list of the categories along with the input type(s) that the score applies to.
category_scores:
anyOf:
- additionalProperties:
type: number
type: object
- type: 'null'
title: Category Scores
description: A list of the categories along with their scores as predicted by model.
user_message:
anyOf:
- type: string
- type: 'null'
title: User Message
description: User message.
metadata:
additionalProperties: true
type: object
title: Metadata
description: Additional metadata.
type: object
required:
- flagged
title: ModerationObjectResults
description: A moderation object.
NumberType:
properties:
type:
type: string
const: number
title: Type
default: number
type: object
title: NumberType
description: "Parameter type for numeric values.\n\n:param type: Discriminator type. Always \"number\""
ObjectType:
properties:
type:
type: string
const: object
title: Type
default: object
type: object
title: ObjectType
description: "Parameter type for object values.\n\n:param type: Discriminator type. Always \"object\""
OpenAIAssistantMessageParam-Input:
properties:
role:
type: string
const: assistant
title: Role
default: assistant
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
- type: 'null'
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
type: object
title: OpenAIAssistantMessageParam
description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
OpenAIAssistantMessageParam-Output:
properties:
role:
type: string
const: assistant
title: Role
default: assistant
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
- type: 'null'
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
type: object
title: OpenAIAssistantMessageParam
description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
OpenAIChatCompletionContentPartImageParam:
properties:
type:
type: string
const: image_url
title: Type
default: image_url
image_url:
$ref: '#/components/schemas/OpenAIImageURL'
type: object
required:
- image_url
title: OpenAIChatCompletionContentPartImageParam
description: Image content part for OpenAI-compatible chat completion messages.
OpenAIChatCompletionContentPartTextParam:
properties:
type:
type: string
const: text
title: Type
default: text
text:
type: string
title: Text
type: object
required:
- text
title: OpenAIChatCompletionContentPartTextParam
description: Text content part for OpenAI-compatible chat completion messages.
OpenAIChatCompletionRequestWithExtraBody:
properties:
model:
type: string
title: Model
messages:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIUserMessageParam-Input'
- $ref: '#/components/schemas/OpenAISystemMessageParam'
- $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input'
- $ref: '#/components/schemas/OpenAIToolMessageParam'
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
discriminator:
propertyName: role
mapping:
assistant: '#/components/schemas/OpenAIAssistantMessageParam-Input'
developer: '#/components/schemas/OpenAIDeveloperMessageParam'
system: '#/components/schemas/OpenAISystemMessageParam'
tool: '#/components/schemas/OpenAIToolMessageParam'
user: '#/components/schemas/OpenAIUserMessageParam-Input'
type: array
minItems: 1
title: Messages
frequency_penalty:
anyOf:
- type: number
- type: 'null'
title: Frequency Penalty
function_call:
anyOf:
- type: string
- additionalProperties: true
type: object
- type: 'null'
title: Function Call
functions:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
title: Functions
logit_bias:
anyOf:
- additionalProperties:
type: number
type: object
- type: 'null'
title: Logit Bias
logprobs:
anyOf:
- type: boolean
- type: 'null'
title: Logprobs
max_completion_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Completion Tokens
max_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Tokens
n:
anyOf:
- type: integer
- type: 'null'
title: N
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
title: Parallel Tool Calls
presence_penalty:
anyOf:
- type: number
- type: 'null'
title: Presence Penalty
response_format:
anyOf:
- oneOf:
- $ref: '#/components/schemas/OpenAIResponseFormatText'
- $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema'
- $ref: '#/components/schemas/OpenAIResponseFormatJSONObject'
discriminator:
propertyName: type
mapping:
json_object: '#/components/schemas/OpenAIResponseFormatJSONObject'
json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema'
text: '#/components/schemas/OpenAIResponseFormatText'
- type: 'null'
title: Response Format
seed:
anyOf:
- type: integer
- type: 'null'
title: Seed
stop:
anyOf:
- type: string
- items:
type: string
type: array
- type: 'null'
title: Stop
stream:
anyOf:
- type: boolean
- type: 'null'
title: Stream
stream_options:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Stream Options
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
tool_choice:
anyOf:
- type: string
- additionalProperties: true
type: object
- type: 'null'
title: Tool Choice
tools:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
title: Tools
top_logprobs:
anyOf:
- type: integer
- type: 'null'
title: Top Logprobs
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
user:
anyOf:
- type: string
- type: 'null'
title: User
additionalProperties: true
type: object
required:
- model
- messages
title: OpenAIChatCompletionRequestWithExtraBody
description: Request parameters for OpenAI-compatible chat completion endpoint.
OpenAIChatCompletionToolCall:
properties:
index:
anyOf:
- type: integer
- type: 'null'
title: Index
id:
anyOf:
- type: string
- type: 'null'
title: Id
type:
type: string
const: function
title: Type
default: function
function:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction'
- type: 'null'
type: object
title: OpenAIChatCompletionToolCall
description: Tool call specification for OpenAI-compatible chat completion responses.
OpenAIChatCompletionToolCallFunction:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
type: object
title: OpenAIChatCompletionToolCallFunction
description: Function call details for OpenAI-compatible tool calls.
OpenAIChatCompletionUsage:
properties:
prompt_tokens:
type: integer
title: Prompt Tokens
completion_tokens:
type: integer
title: Completion Tokens
total_tokens:
type: integer
title: Total Tokens
prompt_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails'
- type: 'null'
completion_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails'
- type: 'null'
type: object
required:
- prompt_tokens
- completion_tokens
- total_tokens
title: OpenAIChatCompletionUsage
description: Usage information for OpenAI chat completion.
OpenAIChatCompletionUsageCompletionTokensDetails:
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
title: Reasoning Tokens
type: object
title: OpenAIChatCompletionUsageCompletionTokensDetails
description: Token details for output tokens in OpenAI chat completion usage.
OpenAIChatCompletionUsagePromptTokensDetails:
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
title: Cached Tokens
type: object
title: OpenAIChatCompletionUsagePromptTokensDetails
description: Token details for prompt tokens in OpenAI chat completion usage.
OpenAIChoice-Input:
properties:
message:
oneOf:
- $ref: '#/components/schemas/OpenAIUserMessageParam-Input'
- $ref: '#/components/schemas/OpenAISystemMessageParam'
- $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input'
- $ref: '#/components/schemas/OpenAIToolMessageParam'
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
title: Message
discriminator:
propertyName: role
mapping:
assistant: '#/components/schemas/OpenAIAssistantMessageParam-Input'
developer: '#/components/schemas/OpenAIDeveloperMessageParam'
system: '#/components/schemas/OpenAISystemMessageParam'
tool: '#/components/schemas/OpenAIToolMessageParam'
user: '#/components/schemas/OpenAIUserMessageParam-Input'
finish_reason:
type: string
title: Finish Reason
index:
type: integer
title: Index
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input'
- type: 'null'
type: object
required:
- message
- finish_reason
- index
title: OpenAIChoice
description: A choice from an OpenAI-compatible chat completion response.
OpenAIChoice-Output:
properties:
message:
oneOf:
- $ref: '#/components/schemas/OpenAIUserMessageParam-Output'
- $ref: '#/components/schemas/OpenAISystemMessageParam'
- $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output'
- $ref: '#/components/schemas/OpenAIToolMessageParam'
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
title: Message
discriminator:
propertyName: role
mapping:
assistant: '#/components/schemas/OpenAIAssistantMessageParam-Output'
developer: '#/components/schemas/OpenAIDeveloperMessageParam'
system: '#/components/schemas/OpenAISystemMessageParam'
tool: '#/components/schemas/OpenAIToolMessageParam'
user: '#/components/schemas/OpenAIUserMessageParam-Output'
finish_reason:
type: string
title: Finish Reason
index:
type: integer
title: Index
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output'
- type: 'null'
type: object
required:
- message
- finish_reason
- index
title: OpenAIChoice
description: A choice from an OpenAI-compatible chat completion response.
OpenAIChoiceLogprobs-Input:
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
type: object
title: OpenAIChoiceLogprobs
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
OpenAIChoiceLogprobs-Output:
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
type: object
title: OpenAIChoiceLogprobs
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
OpenAICompletion:
properties:
id:
type: string
title: Id
choices:
items:
$ref: '#/components/schemas/OpenAICompletionChoice-Output'
type: array
title: Choices
created:
type: integer
title: Created
model:
type: string
title: Model
object:
type: string
const: text_completion
title: Object
default: text_completion
type: object
required:
- id
- choices
- created
- model
title: OpenAICompletion
description: "Response from an OpenAI-compatible completion request.\n\n:id: The ID of the completion\n:choices: List of choices\n:created: The Unix timestamp in seconds when the completion was created\n:model: The model that was used to generate the completion\n:object: The object type, which will be \"text_completion\""
OpenAICompletionChoice-Input:
properties:
finish_reason:
type: string
title: Finish Reason
text:
type: string
title: Text
index:
type: integer
title: Index
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input'
- type: 'null'
type: object
required:
- finish_reason
- text
- index
title: OpenAICompletionChoice
description: "A choice from an OpenAI-compatible completion response.\n\n:finish_reason: The reason the model stopped generating\n:text: The text of the choice\n:index: The index of the choice\n:logprobs: (Optional) The log probabilities for the tokens in the choice"
OpenAICompletionChoice-Output:
properties:
finish_reason:
type: string
title: Finish Reason
text:
type: string
title: Text
index:
type: integer
title: Index
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output'
- type: 'null'
type: object
required:
- finish_reason
- text
- index
title: OpenAICompletionChoice
description: "A choice from an OpenAI-compatible completion response.\n\n:finish_reason: The reason the model stopped generating\n:text: The text of the choice\n:index: The index of the choice\n:logprobs: (Optional) The log probabilities for the tokens in the choice"
OpenAICompletionRequestWithExtraBody:
properties:
model:
type: string
title: Model
prompt:
anyOf:
- type: string
- items:
type: string
type: array
- items:
type: integer
type: array
- items:
items:
type: integer
type: array
type: array
title: Prompt
best_of:
anyOf:
- type: integer
- type: 'null'
title: Best Of
echo:
anyOf:
- type: boolean
- type: 'null'
title: Echo
frequency_penalty:
anyOf:
- type: number
- type: 'null'
title: Frequency Penalty
logit_bias:
anyOf:
- additionalProperties:
type: number
type: object
- type: 'null'
title: Logit Bias
logprobs:
anyOf:
- type: integer
maximum: 5.0
minimum: 0.0
- type: 'null'
title: Logprobs
max_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Tokens
n:
anyOf:
- type: integer
- type: 'null'
title: N
presence_penalty:
anyOf:
- type: number
- type: 'null'
title: Presence Penalty
seed:
anyOf:
- type: integer
- type: 'null'
title: Seed
stop:
anyOf:
- type: string
- items:
type: string
type: array
- type: 'null'
title: Stop
stream:
anyOf:
- type: boolean
- type: 'null'
title: Stream
stream_options:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Stream Options
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
user:
anyOf:
- type: string
- type: 'null'
title: User
suffix:
anyOf:
- type: string
- type: 'null'
title: Suffix
additionalProperties: true
type: object
required:
- model
- prompt
title: OpenAICompletionRequestWithExtraBody
description: Request parameters for OpenAI-compatible completion endpoint.
OpenAICompletionWithInputMessages:
properties:
id:
type: string
title: Id
choices:
items:
$ref: '#/components/schemas/OpenAIChoice-Output'
type: array
title: Choices
object:
type: string
const: chat.completion
title: Object
default: chat.completion
created:
type: integer
title: Created
model:
type: string
title: Model
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsage'
- type: 'null'
input_messages:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIUserMessageParam-Output'
- $ref: '#/components/schemas/OpenAISystemMessageParam'
- $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output'
- $ref: '#/components/schemas/OpenAIToolMessageParam'
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
discriminator:
propertyName: role
mapping:
assistant: '#/components/schemas/OpenAIAssistantMessageParam-Output'
developer: '#/components/schemas/OpenAIDeveloperMessageParam'
system: '#/components/schemas/OpenAISystemMessageParam'
tool: '#/components/schemas/OpenAIToolMessageParam'
user: '#/components/schemas/OpenAIUserMessageParam-Output'
type: array
title: Input Messages
type: object
required:
- id
- choices
- created
- model
- input_messages
title: OpenAICompletionWithInputMessages
OpenAICreateVectorStoreFileBatchRequestWithExtraBody:
properties:
file_ids:
items:
type: string
type: array
title: File Ids
attributes:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Attributes
chunking_strategy:
anyOf:
- oneOf:
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
discriminator:
propertyName: type
mapping:
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
- type: 'null'
title: Chunking Strategy
additionalProperties: true
type: object
required:
- file_ids
title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody
description: Request to create a vector store file batch with extra_body support.
OpenAICreateVectorStoreRequestWithExtraBody:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
file_ids:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: File Ids
expires_after:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Expires After
chunking_strategy:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Chunking Strategy
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
additionalProperties: true
type: object
title: OpenAICreateVectorStoreRequestWithExtraBody
description: Request to create a vector store with extra_body support.
OpenAIDeleteResponseObject:
properties:
id:
type: string
title: Id
description: Unique identifier of the deleted response
object:
type: string
const: response
title: Object
description: Object type identifier, always "response"
default: response
deleted:
type: boolean
title: Deleted
description: Deletion confirmation flag, always True
default: true
type: object
required:
- id
title: OpenAIDeleteResponseObject
description: "Response object confirming deletion of an OpenAI response.\n\n:param id: Unique identifier of the deleted response\n:param object: Object type identifier, always \"response\"\n:param deleted: Deletion confirmation flag, always True"
OpenAIDeveloperMessageParam:
properties:
role:
type: string
const: developer
title: Role
default: developer
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
type: object
required:
- content
title: OpenAIDeveloperMessageParam
description: A message from the developer in an OpenAI-compatible chat completion request.
OpenAIEmbeddingData:
properties:
object:
type: string
const: embedding
title: Object
default: embedding
embedding:
anyOf:
- items:
type: number
type: array
- type: string
title: Embedding
index:
type: integer
title: Index
type: object
required:
- embedding
- index
title: OpenAIEmbeddingData
description: A single embedding data object from an OpenAI-compatible embeddings response.
OpenAIEmbeddingUsage:
properties:
prompt_tokens:
type: integer
title: Prompt Tokens
total_tokens:
type: integer
title: Total Tokens
type: object
required:
- prompt_tokens
- total_tokens
title: OpenAIEmbeddingUsage
description: Usage information for an OpenAI-compatible embeddings response.
OpenAIEmbeddingsRequestWithExtraBody:
properties:
model:
type: string
title: Model
input:
anyOf:
- type: string
- items:
type: string
type: array
title: Input
encoding_format:
anyOf:
- type: string
- type: 'null'
title: Encoding Format
default: float
dimensions:
anyOf:
- type: integer
- type: 'null'
title: Dimensions
user:
anyOf:
- type: string
- type: 'null'
title: User
additionalProperties: true
type: object
required:
- model
- input
title: OpenAIEmbeddingsRequestWithExtraBody
description: Request parameters for OpenAI-compatible embeddings endpoint.
OpenAIEmbeddingsResponse:
properties:
object:
type: string
const: list
title: Object
default: list
data:
items:
$ref: '#/components/schemas/OpenAIEmbeddingData'
type: array
title: Data
model:
type: string
title: Model
usage:
$ref: '#/components/schemas/OpenAIEmbeddingUsage'
type: object
required:
- data
- model
- usage
title: OpenAIEmbeddingsResponse
description: Response from an OpenAI-compatible embeddings request.
OpenAIFile:
properties:
type:
type: string
const: file
title: Type
default: file
file:
$ref: '#/components/schemas/OpenAIFileFile'
type: object
required:
- file
title: OpenAIFile
OpenAIFileDeleteResponse:
properties:
id:
type: string
title: Id
description: The file identifier that was deleted.
object:
type: string
const: file
title: Object
description: The object type, which is always 'file'.
default: file
deleted:
type: boolean
title: Deleted
description: Whether the file was successfully deleted.
type: object
required:
- id
- deleted
title: OpenAIFileDeleteResponse
description: Response for deleting a file in OpenAI Files API.
OpenAIFileFile:
properties:
file_id:
anyOf:
- type: string
- type: 'null'
title: File Id
filename:
anyOf:
- type: string
- type: 'null'
title: Filename
type: object
title: OpenAIFileFile
OpenAIFileObject:
properties:
object:
type: string
const: file
title: Object
description: The object type, which is always 'file'.
default: file
id:
type: string
title: Id
description: The file identifier, which can be referenced in the API endpoints.
bytes:
type: integer
title: Bytes
description: The size of the file, in bytes.
created_at:
type: integer
title: Created At
description: The Unix timestamp (in seconds) for when the file was created.
expires_at:
type: integer
title: Expires At
description: The Unix timestamp (in seconds) for when the file expires.
filename:
type: string
title: Filename
description: The name of the file.
purpose:
$ref: '#/components/schemas/OpenAIFilePurpose'
description: The intended purpose of the file.
type: object
required:
- id
- bytes
- created_at
- expires_at
- filename
- purpose
title: OpenAIFileObject
description: OpenAI File object as defined in the OpenAI Files API.
OpenAIFilePurpose:
type: string
enum:
- assistants
- batch
title: OpenAIFilePurpose
description: Valid purpose values for OpenAI Files API.
OpenAIImageURL:
properties:
url:
type: string
title: Url
detail:
anyOf:
- type: string
- type: 'null'
title: Detail
type: object
required:
- url
title: OpenAIImageURL
description: Image URL specification for OpenAI-compatible chat completion messages.
OpenAIJSONSchema:
properties:
name:
type: string
title: Name
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
type: object
title: OpenAIJSONSchema
description: JSON schema specification for OpenAI-compatible structured response format.
OpenAIResponseAnnotationCitation:
properties:
type:
type: string
const: url_citation
title: Type
description: Annotation type identifier, always "url_citation"
default: url_citation
end_index:
type: integer
title: End Index
description: End position of the citation span in the content
start_index:
type: integer
title: Start Index
description: Start position of the citation span in the content
title:
type: string
title: Title
description: Title of the referenced web resource
url:
type: string
title: Url
description: URL of the referenced web resource
type: object
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
type: string
const: container_file_citation
title: Type
default: container_file_citation
container_id:
type: string
title: Container Id
end_index:
type: integer
title: End Index
file_id:
type: string
title: File Id
filename:
type: string
title: Filename
start_index:
type: integer
title: Start Index
type: object
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
OpenAIResponseAnnotationFileCitation:
properties:
type:
type: string
const: file_citation
title: Type
description: Annotation type identifier, always "file_citation"
default: file_citation
file_id:
type: string
title: File Id
description: Unique identifier of the referenced file
filename:
type: string
title: Filename
description: Name of the referenced file
index:
type: integer
title: Index
description: Position index of the citation within the content
type: object
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
OpenAIResponseAnnotationFilePath:
properties:
type:
type: string
const: file_path
title: Type
default: file_path
file_id:
type: string
title: File Id
index:
type: integer
title: Index
type: object
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
OpenAIResponseContentPartRefusal:
properties:
type:
type: string
const: refusal
title: Type
description: Content part type identifier, always "refusal"
default: refusal
refusal:
type: string
title: Refusal
description: Refusal text supplied by the model
type: object
required:
- refusal
title: OpenAIResponseContentPartRefusal
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
OpenAIResponseError:
properties:
code:
type: string
title: Code
description: Error code identifying the type of failure
message:
type: string
title: Message
description: Human-readable error message describing the failure
type: object
required:
- code
- message
title: OpenAIResponseError
description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure"
OpenAIResponseFormatJSONObject:
properties:
type:
type: string
const: json_object
title: Type
default: json_object
type: object
title: OpenAIResponseFormatJSONObject
description: JSON object response format for OpenAI-compatible chat completion requests.
OpenAIResponseFormatJSONSchema:
properties:
type:
type: string
const: json_schema
title: Type
default: json_schema
json_schema:
$ref: '#/components/schemas/OpenAIJSONSchema'
type: object
required:
- json_schema
title: OpenAIResponseFormatJSONSchema
description: JSON schema response format for OpenAI-compatible chat completion requests.
OpenAIResponseFormatText:
properties:
type:
type: string
const: text
title: Type
default: text
type: object
title: OpenAIResponseFormatText
description: Text response format for OpenAI-compatible chat completion requests.
OpenAIResponseInputFunctionToolCallOutput:
properties:
call_id:
type: string
title: Call Id
output:
type: string
title: Output
type:
type: string
const: function_call_output
title: Type
default: function_call_output
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
type: object
required:
- call_id
- output
title: OpenAIResponseInputFunctionToolCallOutput
description: This represents the output of a function call that gets passed back to the model.
OpenAIResponseInputMessageContentFile:
properties:
type:
type: string
const: input_file
title: Type
description: The type of the input item. Always `input_file`.
default: input_file
file_data:
anyOf:
- type: string
- type: 'null'
title: File Data
description: The data of the file to be sent to the model.
file_id:
anyOf:
- type: string
- type: 'null'
title: File Id
description: The ID of the file to be sent to the model.
file_url:
anyOf:
- type: string
- type: 'null'
title: File Url
description: The URL of the file to be sent to the model.
filename:
anyOf:
- type: string
- type: 'null'
title: Filename
description: The name of the file to be sent to the model.
type: object
title: OpenAIResponseInputMessageContentFile
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
OpenAIResponseInputMessageContentImage:
properties:
detail:
anyOf:
- type: string
const: low
- type: string
const: high
- type: string
const: auto
title: Detail
description: Level of detail for image processing, can be "low", "high", or "auto"
default: auto
type:
type: string
const: input_image
title: Type
description: Content type identifier, always "input_image"
default: input_image
file_id:
anyOf:
- type: string
- type: 'null'
title: File Id
description: The ID of the file to be sent to the model.
image_url:
anyOf:
- type: string
- type: 'null'
title: Image Url
description: URL of the image content
type: object
title: OpenAIResponseInputMessageContentImage
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
OpenAIResponseInputMessageContentText:
properties:
text:
type: string
title: Text
description: The text content of the input message
type:
type: string
const: input_text
title: Type
description: Content type identifier, always "input_text"
default: input_text
type: object
required:
- text
title: OpenAIResponseInputMessageContentText
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
OpenAIResponseInputToolFileSearch:
properties:
type:
type: string
const: file_search
title: Type
description: Tool type identifier, always "file_search"
default: file_search
vector_store_ids:
items:
type: string
type: array
title: Vector Store Ids
description: List of vector store identifiers to search within
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Filters
description: Additional filters to apply to the search
max_num_results:
anyOf:
- type: integer
maximum: 50.0
minimum: 1.0
- type: 'null'
title: Max Num Results
description: Maximum number of search results to return (1-50)
default: 10
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Options for ranking and scoring search results
type: object
required:
- vector_store_ids
title: OpenAIResponseInputToolFileSearch
description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results"
OpenAIResponseInputToolFunction:
properties:
type:
type: string
const: function
title: Type
description: Tool type identifier, always "function"
default: function
name:
type: string
title: Name
description: Name of the function that can be called
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Description of what the function does
parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Parameters
description: JSON schema defining the function's parameters
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
description: Whether to enforce strict parameter validation
type: object
required:
- name
title: OpenAIResponseInputToolFunction
description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation"
OpenAIResponseInputToolMCP:
properties:
type:
type: string
const: mcp
title: Type
description: Tool type identifier, always "mcp"
default: mcp
server_label:
type: string
title: Server Label
description: Label to identify this MCP server
server_url:
type: string
title: Server Url
description: URL endpoint of the MCP server
headers:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Headers
description: HTTP headers to include when connecting to the server
require_approval:
anyOf:
- type: string
const: always
- type: string
const: never
- $ref: '#/components/schemas/ApprovalFilter'
title: Require Approval
description: Approval requirement for tool calls ("always", "never", or filter)
default: never
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
title: Allowed Tools
description: Restriction on which tools can be used from this server
type: object
required:
- server_label
- server_url
title: OpenAIResponseInputToolMCP
description: "Model Context Protocol (MCP) tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param server_url: URL endpoint of the MCP server\n:param headers: (Optional) HTTP headers to include when connecting to the server\n:param require_approval: Approval requirement for tool calls (\"always\", \"never\", or filter)\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
OpenAIResponseInputToolWebSearch:
properties:
type:
anyOf:
- type: string
const: web_search
- type: string
const: web_search_preview
- type: string
const: web_search_preview_2025_03_11
title: Type
description: Web search tool type variant to use
default: web_search
search_context_size:
anyOf:
- type: string
pattern: ^low|medium|high$
- type: 'null'
title: Search Context Size
description: Size of search context, must be "low", "medium", or "high"
default: medium
type: object
title: OpenAIResponseInputToolWebSearch
description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\""
OpenAIResponseMCPApprovalRequest:
properties:
arguments:
type: string
title: Arguments
id:
type: string
title: Id
name:
type: string
title: Name
server_label:
type: string
title: Server Label
type:
type: string
const: mcp_approval_request
title: Type
default: mcp_approval_request
type: object
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
description: A request for human approval of a tool invocation.
OpenAIResponseMCPApprovalResponse:
properties:
approval_request_id:
type: string
title: Approval Request Id
approve:
type: boolean
title: Approve
type:
type: string
const: mcp_approval_response
title: Type
default: mcp_approval_response
id:
anyOf:
- type: string
- type: 'null'
title: Id
reason:
anyOf:
- type: string
- type: 'null'
title: Reason
type: object
required:
- approval_request_id
- approve
title: OpenAIResponseMCPApprovalResponse
description: A response to an MCP approval request.
OpenAIResponseMessage-Input:
properties:
content:
anyOf:
- type: string
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
discriminator:
propertyName: type
mapping:
input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile'
input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage'
input_text: '#/components/schemas/OpenAIResponseInputMessageContentText'
type: array
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
discriminator:
propertyName: type
mapping:
output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- type: string
const: system
- type: string
const: developer
- type: string
const: user
- type: string
const: assistant
title: Role
type:
type: string
const: message
title: Type
default: message
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
type: object
required:
- content
- role
title: OpenAIResponseMessage
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
OpenAIResponseMessage-Output:
properties:
content:
anyOf:
- type: string
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
discriminator:
propertyName: type
mapping:
input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile'
input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage'
input_text: '#/components/schemas/OpenAIResponseInputMessageContentText'
type: array
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
discriminator:
propertyName: type
mapping:
output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- type: string
const: system
- type: string
const: developer
- type: string
const: user
- type: string
const: assistant
title: Role
type:
type: string
const: message
title: Type
default: message
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
type: object
required:
- content
- role
title: OpenAIResponseMessage
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
OpenAIResponseObject:
properties:
created_at:
type: integer
title: Created At
description: Unix timestamp when the response was created
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
type: string
title: Id
description: Unique identifier for this response
model:
type: string
title: Model
description: Model identifier used for generation
object:
type: string
const: response
title: Object
description: Object type identifier, always "response"
default: response
output:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Output'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
type: array
title: Output
description: List of generated output items (messages, tool calls, etc.)
parallel_tool_calls:
type: boolean
title: Parallel Tool Calls
description: Whether tool calls can be executed in parallel
default: false
previous_response_id:
anyOf:
- type: string
- type: 'null'
title: Previous Response Id
description: ID of the previous response in a conversation
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
type: string
title: Status
description: Current status of the response generation
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
description: Sampling temperature used for generation
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
description: Nucleus sampling parameter used for generation
tools:
anyOf:
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
discriminator:
propertyName: type
mapping:
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
function: '#/components/schemas/OpenAIResponseInputToolFunction'
mcp: '#/components/schemas/OpenAIResponseToolMCP'
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch'
type: array
- type: 'null'
title: Tools
description: An array of tools the model may call while generating a response.
truncation:
anyOf:
- type: string
- type: 'null'
title: Truncation
description: Truncation strategy applied to the response
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
title: Instructions
description: System message inserted into the model's context
type: object
required:
- created_at
- id
- model
- output
- status
title: OpenAIResponseObject
description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context"
OpenAIResponseObjectWithInput-Input:
properties:
created_at:
type: integer
title: Created At
description: Unix timestamp when the response was created
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
type: string
title: Id
description: Unique identifier for this response
model:
type: string
title: Model
description: Model identifier used for generation
object:
type: string
const: response
title: Object
description: Object type identifier, always "response"
default: response
output:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Input'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Input'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
type: array
title: Output
description: List of generated output items (messages, tool calls, etc.)
parallel_tool_calls:
type: boolean
title: Parallel Tool Calls
description: Whether tool calls can be executed in parallel
default: false
previous_response_id:
anyOf:
- type: string
- type: 'null'
title: Previous Response Id
description: ID of the previous response in a conversation
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
type: string
title: Status
description: Current status of the response generation
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
description: Sampling temperature used for generation
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
description: Nucleus sampling parameter used for generation
tools:
anyOf:
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
discriminator:
propertyName: type
mapping:
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
function: '#/components/schemas/OpenAIResponseInputToolFunction'
mcp: '#/components/schemas/OpenAIResponseToolMCP'
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch'
type: array
- type: 'null'
title: Tools
description: An array of tools the model may call while generating a response.
truncation:
anyOf:
- type: string
- type: 'null'
title: Truncation
description: Truncation strategy applied to the response
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
title: Instructions
description: System message inserted into the model's context
input:
items:
anyOf:
- oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Input'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Input'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseMessage-Input'
type: array
title: Input
description: List of input items that led to this response
type: object
required:
- created_at
- id
- model
- output
- status
- input
title: OpenAIResponseObjectWithInput
description: "OpenAI response object extended with input context information.\n\n:param input: List of input items that led to this response"
OpenAIResponseObjectWithInput-Output:
properties:
created_at:
type: integer
title: Created At
description: Unix timestamp when the response was created
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
type: string
title: Id
description: Unique identifier for this response
model:
type: string
title: Model
description: Model identifier used for generation
object:
type: string
const: response
title: Object
description: Object type identifier, always "response"
default: response
output:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Output'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
type: array
title: Output
description: List of generated output items (messages, tool calls, etc.)
parallel_tool_calls:
type: boolean
title: Parallel Tool Calls
description: Whether tool calls can be executed in parallel
default: false
previous_response_id:
anyOf:
- type: string
- type: 'null'
title: Previous Response Id
description: ID of the previous response in a conversation
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
type: string
title: Status
description: Current status of the response generation
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
description: Sampling temperature used for generation
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
description: Nucleus sampling parameter used for generation
tools:
anyOf:
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
discriminator:
propertyName: type
mapping:
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
function: '#/components/schemas/OpenAIResponseInputToolFunction'
mcp: '#/components/schemas/OpenAIResponseToolMCP'
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch'
type: array
- type: 'null'
title: Tools
description: An array of tools the model may call while generating a response.
truncation:
anyOf:
- type: string
- type: 'null'
title: Truncation
description: Truncation strategy applied to the response
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
title: Instructions
description: System message inserted into the model's context
input:
items:
anyOf:
- oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
discriminator:
propertyName: type
mapping:
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
message: '#/components/schemas/OpenAIResponseMessage-Output'
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
type: array
title: Input
description: List of input items that led to this response
type: object
required:
- created_at
- id
- model
- output
- status
- input
title: OpenAIResponseObjectWithInput
description: "OpenAI response object extended with input context information.\n\n:param input: List of input items that led to this response"
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
type: string
title: Text
type:
type: string
const: output_text
title: Type
default: output_text
annotations:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
discriminator:
propertyName: type
mapping:
container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath'
url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation'
type: array
title: Annotations
type: object
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
OpenAIResponseOutputMessageFileSearchToolCall:
properties:
id:
type: string
title: Id
description: Unique identifier for this tool call
queries:
items:
type: string
type: array
title: Queries
description: List of search queries executed
status:
type: string
title: Status
description: Current status of the file search operation
type:
type: string
const: file_search_call
title: Type
description: Tool call type identifier, always "file_search_call"
default: file_search_call
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
title: Results
description: Search results returned by the file search operation
type: object
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
OpenAIResponseOutputMessageFileSearchToolCallResults:
properties:
attributes:
additionalProperties: true
type: object
title: Attributes
description: Key-value attributes associated with the file
file_id:
type: string
title: File Id
description: Unique identifier of the file containing the result
filename:
type: string
title: Filename
description: Name of the file containing the result
score:
type: number
title: Score
description: Relevance score for this search result (between 0 and 1)
text:
type: string
title: Text
description: Text content of the search result
type: object
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
OpenAIResponseOutputMessageFunctionToolCall:
properties:
call_id:
type: string
title: Call Id
description: Unique identifier for the function call
name:
type: string
title: Name
description: Name of the function being called
arguments:
type: string
title: Arguments
description: JSON string containing the function arguments
type:
type: string
const: function_call
title: Type
description: Tool call type identifier, always "function_call"
default: function_call
id:
anyOf:
- type: string
- type: 'null'
title: Id
description: Additional identifier for the tool call
status:
anyOf:
- type: string
- type: 'null'
title: Status
description: Current status of the function call execution
type: object
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
OpenAIResponseOutputMessageMCPCall:
properties:
id:
type: string
title: Id
description: Unique identifier for this MCP call
type:
type: string
const: mcp_call
title: Type
description: Tool call type identifier, always "mcp_call"
default: mcp_call
arguments:
type: string
title: Arguments
description: JSON string containing the MCP call arguments
name:
type: string
title: Name
description: Name of the MCP method being called
server_label:
type: string
title: Server Label
description: Label identifying the MCP server handling the call
error:
anyOf:
- type: string
- type: 'null'
title: Error
description: Error message if the MCP call failed
output:
anyOf:
- type: string
- type: 'null'
title: Output
description: Output result from the successful MCP call
type: object
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
OpenAIResponseOutputMessageMCPListTools:
properties:
id:
type: string
title: Id
description: Unique identifier for this MCP list tools operation
type:
type: string
const: mcp_list_tools
title: Type
description: Tool call type identifier, always "mcp_list_tools"
default: mcp_list_tools
server_label:
type: string
title: Server Label
description: Label identifying the MCP server providing the tools
tools:
items:
$ref: '#/components/schemas/MCPListToolsTool'
type: array
title: Tools
description: List of available tools provided by the MCP server
type: object
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
OpenAIResponseOutputMessageWebSearchToolCall:
properties:
id:
type: string
title: Id
description: Unique identifier for this tool call
status:
type: string
title: Status
description: Current status of the web search operation
type:
type: string
const: web_search_call
title: Type
description: Tool call type identifier, always "web_search_call"
default: web_search_call
type: object
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
OpenAIResponsePrompt:
properties:
id:
type: string
title: Id
description: Unique identifier of the prompt template
variables:
anyOf:
- additionalProperties:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
discriminator:
propertyName: type
mapping:
input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile'
input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage'
input_text: '#/components/schemas/OpenAIResponseInputMessageContentText'
type: object
- type: 'null'
title: Variables
description: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files.
version:
anyOf:
- type: string
- type: 'null'
title: Version
description: Version number of the prompt to use (defaults to latest if not specified)
type: object
required:
- id
title: OpenAIResponsePrompt
description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)"
OpenAIResponseText:
properties:
format:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseTextFormat'
- type: 'null'
description: Text format configuration specifying output format requirements
type: object
title: OpenAIResponseText
description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements"
OpenAIResponseTextFormat:
properties:
type:
anyOf:
- type: string
const: text
- type: string
const: json_schema
- type: string
const: json_object
title: Type
name:
anyOf:
- type: string
- type: 'null'
title: Name
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
type: object
title: OpenAIResponseTextFormat
description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema."
OpenAIResponseToolMCP:
properties:
type:
type: string
const: mcp
title: Type
description: Tool type identifier, always "mcp"
default: mcp
server_label:
type: string
title: Server Label
description: Label to identify this MCP server
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
title: Allowed Tools
description: Restriction on which tools can be used from this server
type: object
required:
- server_label
title: OpenAIResponseToolMCP
description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
OpenAIResponseUsage:
properties:
input_tokens:
type: integer
title: Input Tokens
description: Number of tokens in the input
output_tokens:
type: integer
title: Output Tokens
description: Number of tokens in the output
total_tokens:
type: integer
title: Total Tokens
description: Total tokens used (input + output)
input_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails'
- type: 'null'
description: Detailed breakdown of input token usage
output_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails'
- type: 'null'
description: Detailed breakdown of output token usage
type: object
required:
- input_tokens
- output_tokens
- total_tokens
title: OpenAIResponseUsage
description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage"
OpenAIResponseUsageInputTokensDetails:
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
title: Cached Tokens
description: Number of tokens retrieved from cache
type: object
title: OpenAIResponseUsageInputTokensDetails
description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache"
OpenAIResponseUsageOutputTokensDetails:
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
title: Reasoning Tokens
description: Number of tokens used for reasoning (o1/o3 models)
type: object
title: OpenAIResponseUsageOutputTokensDetails
description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)"
OpenAISystemMessageParam:
properties:
role:
type: string
const: system
title: Role
default: system
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
type: object
required:
- content
title: OpenAISystemMessageParam
description: A system message providing instructions or context to the model.
OpenAITokenLogProb:
properties:
token:
type: string
title: Token
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
type: number
title: Logprob
top_logprobs:
items:
$ref: '#/components/schemas/OpenAITopLogProb'
type: array
title: Top Logprobs
type: object
required:
- token
- logprob
- top_logprobs
title: OpenAITokenLogProb
description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token"
OpenAIToolMessageParam:
properties:
role:
type: string
const: tool
title: Role
default: tool
tool_call_id:
type: string
title: Tool Call Id
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
type: object
required:
- tool_call_id
- content
title: OpenAIToolMessageParam
description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
OpenAITopLogProb:
properties:
token:
type: string
title: Token
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
type: number
title: Logprob
type: object
required:
- token
- logprob
title: OpenAITopLogProb
description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token"
OpenAIUserMessageParam-Input:
properties:
role:
type: string
const: user
title: Role
default: user
content:
anyOf:
- type: string
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
- $ref: '#/components/schemas/OpenAIFile'
discriminator:
propertyName: type
mapping:
file: '#/components/schemas/OpenAIFile'
image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
type: object
required:
- content
title: OpenAIUserMessageParam
description: A message from the user in an OpenAI-compatible chat completion request.
OpenAIUserMessageParam-Output:
properties:
role:
type: string
const: user
title: Role
default: user
content:
anyOf:
- type: string
- items:
oneOf:
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
- $ref: '#/components/schemas/OpenAIFile'
discriminator:
propertyName: type
mapping:
file: '#/components/schemas/OpenAIFile'
image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
type: object
required:
- content
title: OpenAIUserMessageParam
description: A message from the user in an OpenAI-compatible chat completion request.
OptimizerConfig:
properties:
optimizer_type:
$ref: '#/components/schemas/OptimizerType'
lr:
type: number
title: Lr
weight_decay:
type: number
title: Weight Decay
num_warmup_steps:
type: integer
title: Num Warmup Steps
type: object
required:
- optimizer_type
- lr
- weight_decay
- num_warmup_steps
title: OptimizerConfig
description: Configuration parameters for the optimization algorithm.
OptimizerType:
type: string
enum:
- adam
- adamw
- sgd
title: OptimizerType
description: Available optimizer algorithms for training.
Order:
type: string
enum:
- asc
- desc
title: Order
description: Sort order for paginated responses.
OutputTokensDetails:
properties:
reasoning_tokens:
type: integer
title: Reasoning Tokens
additionalProperties: true
type: object
required:
- reasoning_tokens
title: OutputTokensDetails
PaginatedResponse:
properties:
data:
items:
additionalProperties: true
type: object
type: array
title: Data
description: The list of items for the current page.
has_more:
type: boolean
title: Has More
description: Whether there are more items available after this set.
url:
anyOf:
- type: string
- type: 'null'
title: Url
description: The URL for accessing this list.
type: object
required:
- data
- has_more
- url
title: PaginatedResponse
description: A generic paginated response that follows a simple format.
PostTrainingJob:
properties:
job_uuid:
type: string
title: Job Uuid
description: The UUID of the job
type: object
required:
- job_uuid
title: PostTrainingJob
PostTrainingJobArtifactsResponse:
properties:
job_uuid:
type: string
title: Job Uuid
description: The UUID of the job
checkpoints:
items:
$ref: '#/components/schemas/Checkpoint'
type: array
title: Checkpoints
type: object
required:
- job_uuid
title: PostTrainingJobArtifactsResponse
description: Artifacts of a finetuning job.
PostTrainingJobStatusResponse:
properties:
job_uuid:
type: string
title: Job Uuid
status:
$ref: '#/components/schemas/JobStatus'
scheduled_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Scheduled At
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
resources_allocated:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Resources Allocated
checkpoints:
items:
$ref: '#/components/schemas/Checkpoint'
type: array
title: Checkpoints
type: object
required:
- job_uuid
- status
title: PostTrainingJobStatusResponse
description: Status of a finetuning job.
PostTrainingMetric:
properties:
epoch:
type: integer
title: Epoch
description: Training epoch number.
train_loss:
type: number
title: Train Loss
description: Loss value on the training dataset.
validation_loss:
type: number
title: Validation Loss
description: Loss value on the validation dataset.
perplexity:
type: number
title: Perplexity
description: Perplexity metric indicating model confidence.
type: object
required:
- epoch
- train_loss
- validation_loss
- perplexity
title: PostTrainingMetric
description: Training metrics captured during post-training jobs.
PreferenceOptimizeRequest:
properties:
job_uuid:
type: string
title: Job Uuid
description: The UUID of the job to create
finetuned_model:
type: string
title: Finetuned Model
description: The model to fine-tune
algorithm_config:
$ref: '#/components/schemas/DPOAlignmentConfig'
description: The algorithm configuration
training_config:
$ref: '#/components/schemas/TrainingConfig'
description: The training configuration
hyperparam_search_config:
additionalProperties: true
type: object
title: Hyperparam Search Config
description: The hyperparam search configuration
logger_config:
additionalProperties: true
type: object
title: Logger Config
description: The logger configuration
type: object
required:
- job_uuid
- finetuned_model
- algorithm_config
- training_config
- hyperparam_search_config
- logger_config
title: PreferenceOptimizeRequest
description: Request to run preference optimization of a model.
Prompt:
properties:
prompt:
anyOf:
- type: string
- type: 'null'
title: Prompt
description: The system prompt text with variable placeholders. Variables are only supported when using the Responses API.
version:
type: integer
minimum: 1.0
title: Version
description: Version (integer starting at 1, incremented on save).
prompt_id:
type: string
title: Prompt Id
description: Unique identifier formatted as 'pmpt_<48-digit-hash>'.
variables:
items:
type: string
type: array
title: Variables
description: List of prompt variable names that can be used in the prompt template.
is_default:
type: boolean
title: Is Default
description: Boolean indicating whether this version is the default version for this prompt.
default: false
type: object
required:
- version
- prompt_id
title: Prompt
description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack.
ProviderInfo:
properties:
api:
type: string
title: Api
description: The API name this provider implements
provider_id:
type: string
title: Provider Id
description: Unique identifier for the provider
provider_type:
type: string
title: Provider Type
description: The type of provider implementation
config:
additionalProperties: true
type: object
title: Config
description: Configuration parameters for the provider
health:
additionalProperties: true
type: object
title: Health
description: Current health status of the provider
type: object
required:
- api
- provider_id
- provider_type
- config
- health
title: ProviderInfo
description: Information about a registered provider including its configuration and health status.
QATFinetuningConfig:
properties:
type:
type: string
const: QAT
title: Type
default: QAT
quantizer_name:
type: string
title: Quantizer Name
group_size:
type: integer
title: Group Size
type: object
required:
- quantizer_name
- group_size
title: QATFinetuningConfig
description: Configuration for Quantization-Aware Training (QAT) fine-tuning.
QueryChunksRequest:
properties:
vector_store_id:
type: string
title: Vector Store Id
description: The identifier of the vector database to query.
query:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Query
description: The query to search for.
params:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Params
description: The parameters of the query.
type: object
required:
- vector_store_id
- query
title: QueryChunksRequest
description: Request to query chunks from a vector database.
QueryChunksResponse:
properties:
chunks:
items:
$ref: '#/components/schemas/Chunk-Output'
type: array
title: Chunks
scores:
items:
type: number
type: array
title: Scores
type: object
required:
- chunks
- scores
title: QueryChunksResponse
description: Response from querying chunks in a vector database.
RAGDocument:
properties:
document_id:
type: string
title: Document Id
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
title: Content
mime_type:
anyOf:
- type: string
- type: 'null'
title: Mime Type
metadata:
additionalProperties: true
type: object
title: Metadata
type: object
required:
- document_id
- content
title: RAGDocument
description: "A document to be used for document ingestion in the RAG Tool.\n\n:param document_id: The unique identifier for the document.\n:param content: The content of the document.\n:param mime_type: The MIME type of the document.\n:param metadata: Additional metadata for the document."
RAGQueryConfig:
properties:
query_generator_config:
oneOf:
- $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig'
- $ref: '#/components/schemas/LLMRAGQueryGeneratorConfig'
title: Query Generator Config
default:
type: default
separator: ' '
discriminator:
propertyName: type
mapping:
default: '#/components/schemas/DefaultRAGQueryGeneratorConfig'
llm: '#/components/schemas/LLMRAGQueryGeneratorConfig'
max_tokens_in_context:
type: integer
title: Max Tokens In Context
default: 4096
max_chunks:
type: integer
title: Max Chunks
default: 5
chunk_template:
type: string
title: Chunk Template
default: "Result {index}\nContent: {chunk.content}\nMetadata: {metadata}\n"
mode:
anyOf:
- $ref: '#/components/schemas/RAGSearchMode'
- type: 'null'
default: vector
ranker:
anyOf:
- oneOf:
- $ref: '#/components/schemas/RRFRanker'
- $ref: '#/components/schemas/WeightedRanker'
discriminator:
propertyName: type
mapping:
rrf: '#/components/schemas/RRFRanker'
weighted: '#/components/schemas/WeightedRanker'
- type: 'null'
title: Ranker
type: object
title: RAGQueryConfig
description: "Configuration for the RAG query generation.\n\n:param query_generator_config: Configuration for the query generator.\n:param max_tokens_in_context: Maximum number of tokens in the context.\n:param max_chunks: Maximum number of chunks to retrieve.\n:param chunk_template: Template for formatting each retrieved chunk in the context.\n Available placeholders: {index} (1-based chunk ordinal), {chunk.content} (chunk content string), {metadata} (chunk metadata dict).\n Default: \"Result {index}\\nContent: {chunk.content}\\nMetadata: {metadata}\\n\"\n:param mode: Search mode for retrieval—either \"vector\", \"keyword\", or \"hybrid\". Default \"vector\".\n:param ranker: Configuration for the ranker to use in hybrid search. Defaults to RRF ranker."
RAGQueryResult:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Content
metadata:
additionalProperties: true
type: object
title: Metadata
type: object
title: RAGQueryResult
description: "Result of a RAG query containing retrieved content and metadata.\n\n:param content: (Optional) The retrieved content from the query\n:param metadata: Additional metadata about the query result"
RAGSearchMode:
type: string
enum:
- vector
- keyword
- hybrid
title: RAGSearchMode
description: "Search modes for RAG query retrieval:\n- VECTOR: Uses vector similarity search for semantic matching\n- KEYWORD: Uses keyword-based search for exact matching\n- HYBRID: Combines both vector and keyword search for better results"
RRFRanker:
properties:
type:
type: string
const: rrf
title: Type
default: rrf
impact_factor:
type: number
title: Impact Factor
default: 60.0
minimum: 0.0
type: object
title: RRFRanker
description: "Reciprocal Rank Fusion (RRF) ranker configuration.\n\n:param type: The type of ranker, always \"rrf\"\n:param impact_factor: The impact factor for RRF scoring. Higher values give more weight to higher-ranked results.\n Must be greater than 0"
RegexParserScoringFnParams:
properties:
type:
type: string
const: regex_parser
title: Type
default: regex_parser
parsing_regexes:
items:
type: string
type: array
title: Parsing Regexes
description: Regex to extract the answer from generated response
aggregation_functions:
items:
$ref: '#/components/schemas/AggregationFunctionType'
type: array
title: Aggregation Functions
description: Aggregation functions to apply to the scores of each row
type: object
title: RegexParserScoringFnParams
description: Parameters for regex parser scoring function configuration.
RegisterBenchmarkRequest:
properties:
benchmark_id:
type: string
title: Benchmark Id
description: The ID of the benchmark to register
dataset_id:
type: string
title: Dataset Id
description: The ID of the dataset to use for the benchmark
scoring_functions:
items:
type: string
type: array
title: Scoring Functions
description: The scoring functions to use for the benchmark
provider_benchmark_id:
anyOf:
- type: string
- type: 'null'
title: Provider Benchmark Id
description: The ID of the provider benchmark to use for the benchmark
provider_id:
anyOf:
- type: string
- type: 'null'
title: Provider Id
description: The ID of the provider to use for the benchmark
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
description: The metadata to use for the benchmark
type: object
required:
- benchmark_id
- dataset_id
- scoring_functions
title: RegisterBenchmarkRequest
description: Request model for registering a benchmark.
RegisterDatasetRequest:
properties:
purpose:
$ref: '#/components/schemas/DatasetPurpose'
description: The purpose of the dataset
source:
oneOf:
- $ref: '#/components/schemas/URIDataSource'
- $ref: '#/components/schemas/RowsDataSource'
title: Source
description: The data source of the dataset
discriminator:
propertyName: type
mapping:
rows: '#/components/schemas/RowsDataSource'
uri: '#/components/schemas/URIDataSource'
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
description: The metadata for the dataset
dataset_id:
anyOf:
- type: string
- type: 'null'
title: Dataset Id
description: The ID of the dataset. If not provided, an ID will be generated
type: object
required:
- purpose
- source
title: RegisterDatasetRequest
description: Request model for registering a dataset.
RegisterModelRequest:
properties:
model_id:
type: string
title: Model Id
description: The identifier of the model to register.
provider_model_id:
anyOf:
- type: string
- type: 'null'
title: Provider Model Id
description: The identifier of the model in the provider.
provider_id:
anyOf:
- type: string
- type: 'null'
title: Provider Id
description: The identifier of the provider.
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
description: Any additional metadata for this model.
model_type:
anyOf:
- $ref: '#/components/schemas/ModelType'
- type: 'null'
description: The type of model to register.
type: object
required:
- model_id
title: RegisterModelRequest
description: Request model for registering a new model.
RegisterScoringFunctionRequest:
properties:
scoring_fn_id:
type: string
title: Scoring Fn Id
description: The ID of the scoring function to register
description:
type: string
title: Description
description: The description of the scoring function
return_type:
oneOf:
- $ref: '#/components/schemas/StringType'
- $ref: '#/components/schemas/NumberType'
- $ref: '#/components/schemas/BooleanType'
- $ref: '#/components/schemas/ArrayType'
- $ref: '#/components/schemas/ObjectType'
- $ref: '#/components/schemas/JsonType'
- $ref: '#/components/schemas/UnionType'
- $ref: '#/components/schemas/ChatCompletionInputType'
- $ref: '#/components/schemas/CompletionInputType'
- $ref: '#/components/schemas/AgentTurnInputType'
title: Return Type
description: The return type of the scoring function
discriminator:
propertyName: type
mapping:
agent_turn_input: '#/components/schemas/AgentTurnInputType'
array: '#/components/schemas/ArrayType'
boolean: '#/components/schemas/BooleanType'
chat_completion_input: '#/components/schemas/ChatCompletionInputType'
completion_input: '#/components/schemas/CompletionInputType'
json: '#/components/schemas/JsonType'
number: '#/components/schemas/NumberType'
object: '#/components/schemas/ObjectType'
string: '#/components/schemas/StringType'
union: '#/components/schemas/UnionType'
provider_scoring_fn_id:
anyOf:
- type: string
- type: 'null'
title: Provider Scoring Fn Id
description: The ID of the provider scoring function to use for the scoring function
provider_id:
anyOf:
- type: string
- type: 'null'
title: Provider Id
description: The ID of the provider to use for the scoring function
params:
anyOf:
- oneOf:
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
- $ref: '#/components/schemas/RegexParserScoringFnParams'
- $ref: '#/components/schemas/BasicScoringFnParams'
discriminator:
propertyName: type
mapping:
basic: '#/components/schemas/BasicScoringFnParams'
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
- type: 'null'
title: Params
description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval
type: object
required:
- scoring_fn_id
- description
- return_type
title: RegisterScoringFunctionRequest
description: Request model for registering a scoring function.
RegisterShieldRequest:
properties:
shield_id:
type: string
title: Shield Id
description: The identifier of the shield to register
provider_shield_id:
anyOf:
- type: string
- type: 'null'
title: Provider Shield Id
description: The identifier of the shield in the provider
provider_id:
anyOf:
- type: string
- type: 'null'
title: Provider Id
description: The identifier of the provider
params:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Params
description: The parameters of the shield
type: object
required:
- shield_id
title: RegisterShieldRequest
description: Request model for registering a shield.
RegisterToolGroupRequest:
properties:
toolgroup_id:
type: string
title: Toolgroup Id
description: The ID of the tool group to register
provider_id:
type: string
title: Provider Id
description: The ID of the provider to use for the tool group
mcp_endpoint:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
description: The MCP endpoint to use for the tool group
args:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Args
description: A dictionary of arguments to pass to the tool group
type: object
required:
- toolgroup_id
- provider_id
title: RegisterToolGroupRequest
description: Request model for registering a tool group.
RerankData:
properties:
index:
type: integer
title: Index
relevance_score:
type: number
title: Relevance Score
type: object
required:
- index
- relevance_score
title: RerankData
description: A single rerank result from a reranking response.
RerankResponse:
properties:
data:
items:
$ref: '#/components/schemas/RerankData'
type: array
title: Data
type: object
required:
- data
title: RerankResponse
description: Response from a reranking request.
ResponseGuardrailSpec:
properties:
type:
type: string
title: Type
description: The type/identifier of the guardrail.
type: object
required:
- type
title: ResponseGuardrailSpec
description: Specification for a guardrail to apply during response generation.
RouteInfo:
properties:
route:
type: string
title: Route
description: The API endpoint path
method:
type: string
title: Method
description: HTTP method for the route
provider_types:
items:
type: string
type: array
title: Provider Types
description: List of provider types that implement this route
type: object
required:
- route
- method
- provider_types
title: RouteInfo
description: Information about an API route including its path, method, and implementing providers.
RowsDataSource:
properties:
type:
type: string
const: rows
title: Type
description: The type of data source
default: rows
rows:
items:
additionalProperties: true
type: object
type: array
title: Rows
description: "The dataset is stored in rows. E.g. [{'messages': [{'role': 'user', 'content': 'Hello, world!'}, {'role': 'assistant', 'content': 'Hello, world!'}]}]"
type: object
required:
- rows
title: RowsDataSource
description: A dataset stored in rows.
RunModerationRequest:
properties:
input:
anyOf:
- type: string
- items:
type: string
type: array
title: Input
description: Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
model:
anyOf:
- type: string
- type: 'null'
title: Model
description: The content moderation model you would like to use.
type: object
required:
- input
title: RunModerationRequest
description: Request model for running moderation.
RunShieldRequest:
properties:
shield_id:
type: string
title: Shield Id
description: The identifier of the shield to run.
messages:
items:
oneOf:
- $ref: '#/components/schemas/OpenAIUserMessageParam-Input'
- $ref: '#/components/schemas/OpenAISystemMessageParam'
- $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input'
- $ref: '#/components/schemas/OpenAIToolMessageParam'
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
discriminator:
propertyName: role
mapping:
assistant: '#/components/schemas/OpenAIAssistantMessageParam-Input'
developer: '#/components/schemas/OpenAIDeveloperMessageParam'
system: '#/components/schemas/OpenAISystemMessageParam'
tool: '#/components/schemas/OpenAIToolMessageParam'
user: '#/components/schemas/OpenAIUserMessageParam-Input'
type: array
title: Messages
description: The messages to run the shield on.
params:
additionalProperties: true
type: object
title: Params
description: The parameters of the shield.
type: object
required:
- shield_id
- messages
- params
title: RunShieldRequest
description: Request model for running a shield.
RunShieldResponse:
properties:
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: Safety violation detected by the shield, if any.
type: object
title: RunShieldResponse
description: Response from running a safety shield.
SafetyViolation:
properties:
violation_level:
$ref: '#/components/schemas/ViolationLevel'
description: Severity level of the violation.
user_message:
anyOf:
- type: string
- type: 'null'
title: User Message
description: Message to convey to the user about the violation.
metadata:
additionalProperties: true
type: object
title: Metadata
description: Additional metadata including specific violation codes for debugging and telemetry.
type: object
required:
- violation_level
title: SafetyViolation
description: Details of a safety violation detected by content moderation.
SamplingParams:
properties:
strategy:
oneOf:
- $ref: '#/components/schemas/GreedySamplingStrategy'
- $ref: '#/components/schemas/TopPSamplingStrategy'
- $ref: '#/components/schemas/TopKSamplingStrategy'
title: Strategy
discriminator:
propertyName: type
mapping:
greedy: '#/components/schemas/GreedySamplingStrategy'
top_k: '#/components/schemas/TopKSamplingStrategy'
top_p: '#/components/schemas/TopPSamplingStrategy'
max_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Tokens
repetition_penalty:
anyOf:
- type: number
- type: 'null'
title: Repetition Penalty
default: 1.0
stop:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Stop
type: object
title: SamplingParams
description: Sampling parameters.
ScoreBatchRequest:
properties:
dataset_id:
type: string
title: Dataset Id
description: The ID of the dataset to score
scoring_functions:
additionalProperties:
anyOf:
- oneOf:
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
- $ref: '#/components/schemas/RegexParserScoringFnParams'
- $ref: '#/components/schemas/BasicScoringFnParams'
discriminator:
propertyName: type
mapping:
basic: '#/components/schemas/BasicScoringFnParams'
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
- type: 'null'
type: object
title: Scoring Functions
description: The scoring functions to use for the scoring
save_results_dataset:
type: boolean
title: Save Results Dataset
description: Whether to save the results to a dataset
default: false
type: object
required:
- dataset_id
- scoring_functions
title: ScoreBatchRequest
description: Request for batch scoring operations.
ScoreBatchResponse:
properties:
dataset_id:
anyOf:
- type: string
- type: 'null'
title: Dataset Id
description: The identifier of the dataset that was scored
results:
additionalProperties:
$ref: '#/components/schemas/ScoringResult'
type: object
title: Results
description: A map of scoring function name to ScoringResult
type: object
required:
- results
title: ScoreBatchResponse
description: Response from batch scoring operations on datasets.
ScoreRequest:
properties:
input_rows:
items:
additionalProperties: true
type: object
type: array
title: Input Rows
description: The rows to score
scoring_functions:
additionalProperties:
anyOf:
- oneOf:
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
- $ref: '#/components/schemas/RegexParserScoringFnParams'
- $ref: '#/components/schemas/BasicScoringFnParams'
discriminator:
propertyName: type
mapping:
basic: '#/components/schemas/BasicScoringFnParams'
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
- type: 'null'
type: object
title: Scoring Functions
description: The scoring functions to use for the scoring
type: object
required:
- input_rows
- scoring_functions
title: ScoreRequest
description: Request for scoring a list of rows.
ScoreResponse:
properties:
results:
additionalProperties:
$ref: '#/components/schemas/ScoringResult'
type: object
title: Results
description: A map of scoring function name to ScoringResult
type: object
required:
- results
title: ScoreResponse
description: The response from scoring.
ScoringFn:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for this resource in llama stack
provider_resource_id:
anyOf:
- type: string
- type: 'null'
title: Provider Resource Id
description: Unique identifier for this resource in the provider
provider_id:
type: string
title: Provider Id
description: ID of the provider that owns this resource
type:
type: string
const: scoring_function
title: Type
default: scoring_function
description:
anyOf:
- type: string
- type: 'null'
title: Description
metadata:
additionalProperties: true
type: object
title: Metadata
description: Any additional metadata for this definition
return_type:
oneOf:
- $ref: '#/components/schemas/StringType'
- $ref: '#/components/schemas/NumberType'
- $ref: '#/components/schemas/BooleanType'
- $ref: '#/components/schemas/ArrayType'
- $ref: '#/components/schemas/ObjectType'
- $ref: '#/components/schemas/JsonType'
- $ref: '#/components/schemas/UnionType'
- $ref: '#/components/schemas/ChatCompletionInputType'
- $ref: '#/components/schemas/CompletionInputType'
- $ref: '#/components/schemas/AgentTurnInputType'
title: Return Type
description: The return type of the deterministic function
discriminator:
propertyName: type
mapping:
agent_turn_input: '#/components/schemas/AgentTurnInputType'
array: '#/components/schemas/ArrayType'
boolean: '#/components/schemas/BooleanType'
chat_completion_input: '#/components/schemas/ChatCompletionInputType'
completion_input: '#/components/schemas/CompletionInputType'
json: '#/components/schemas/JsonType'
number: '#/components/schemas/NumberType'
object: '#/components/schemas/ObjectType'
string: '#/components/schemas/StringType'
union: '#/components/schemas/UnionType'
params:
anyOf:
- oneOf:
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
- $ref: '#/components/schemas/RegexParserScoringFnParams'
- $ref: '#/components/schemas/BasicScoringFnParams'
discriminator:
propertyName: type
mapping:
basic: '#/components/schemas/BasicScoringFnParams'
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
- type: 'null'
title: Params
description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval
type: object
required:
- identifier
- provider_id
- return_type
title: ScoringFn
description: A scoring function resource for evaluating model outputs.
ScoringResult:
properties:
score_rows:
items:
additionalProperties: true
type: object
type: array
title: Score Rows
description: The scoring result for each row. Each row is a map of column name to value
aggregated_results:
additionalProperties: true
type: object
title: Aggregated Results
description: Map of metric name to aggregated value
type: object
required:
- score_rows
- aggregated_results
title: ScoringResult
description: A scoring result for a single row.
SearchRankingOptions:
properties:
ranker:
anyOf:
- type: string
- type: 'null'
title: Ranker
score_threshold:
anyOf:
- type: number
- type: 'null'
title: Score Threshold
default: 0.0
type: object
title: SearchRankingOptions
description: Options for ranking and filtering search results.
Session:
properties:
session_id:
type: string
title: Session Id
description: Unique identifier for the conversation session
session_name:
type: string
title: Session Name
description: Human-readable name for the session
turns:
items:
$ref: '#/components/schemas/Turn'
type: array
title: Turns
description: List of all turns that have occurred in this session
started_at:
type: string
format: date-time
title: Started At
description: Timestamp when the session was created
type: object
required:
- session_id
- session_name
- turns
- started_at
title: Session
description: A single session of an interaction with an Agentic System.
SetDefaultVersionRequest:
properties:
version:
type: integer
title: Version
description: The version to set as default.
type: object
required:
- version
title: SetDefaultVersionRequest
description: Request model for setting a prompt version as default.
Shield:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for this resource in llama stack
provider_resource_id:
anyOf:
- type: string
- type: 'null'
title: Provider Resource Id
description: Unique identifier for this resource in the provider
provider_id:
type: string
title: Provider Id
description: ID of the provider that owns this resource
type:
type: string
const: shield
title: Type
description: The resource type, always shield
default: shield
params:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Params
description: Configuration parameters for the shield
type: object
required:
- identifier
- provider_id
title: Shield
description: A safety shield resource that can be used to check content.
ShieldCallStep-Input:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: shield_call
title: Step Type
default: shield_call
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
type: object
required:
- turn_id
- step_id
title: ShieldCallStep
description: A shield call step in an agent turn.
ShieldCallStep-Output:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: shield_call
title: Step Type
default: shield_call
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
type: object
required:
- turn_id
- step_id
title: ShieldCallStep
description: A shield call step in an agent turn.
StopReason:
type: string
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
StringType:
properties:
type:
type: string
const: string
title: Type
default: string
type: object
title: StringType
description: "Parameter type for string values.\n\n:param type: Discriminator type. Always \"string\""
SupervisedFineTuneRequest:
properties:
job_uuid:
type: string
title: Job Uuid
description: The UUID of the job to create
training_config:
$ref: '#/components/schemas/TrainingConfig'
description: The training configuration
hyperparam_search_config:
additionalProperties: true
type: object
title: Hyperparam Search Config
description: The hyperparam search configuration
logger_config:
additionalProperties: true
type: object
title: Logger Config
description: The logger configuration
model:
anyOf:
- type: string
- type: 'null'
title: Model
description: Model descriptor for training if not in provider config`
checkpoint_dir:
anyOf:
- type: string
- type: 'null'
title: Checkpoint Dir
description: The directory to save checkpoint(s) to
algorithm_config:
anyOf:
- oneOf:
- $ref: '#/components/schemas/LoraFinetuningConfig'
- $ref: '#/components/schemas/QATFinetuningConfig'
discriminator:
propertyName: type
mapping:
LoRA: '#/components/schemas/LoraFinetuningConfig'
QAT: '#/components/schemas/QATFinetuningConfig'
- type: 'null'
title: Algorithm Config
description: The algorithm configuration
type: object
required:
- job_uuid
- training_config
- hyperparam_search_config
- logger_config
title: SupervisedFineTuneRequest
description: Request to run supervised fine-tuning of a model.
SystemMessage:
properties:
role:
type: string
const: system
title: Role
default: system
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
type: object
required:
- content
title: SystemMessage
description: A system message providing instructions or context to the model.
SystemMessageBehavior:
type: string
enum:
- append
- replace
title: SystemMessageBehavior
description: "Config for how to override the default system prompt.\n\nhttps://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt-\n'{{function_definitions}}' to indicate where the function definitions should be inserted."
TextContentItem:
properties:
type:
type: string
const: text
title: Type
default: text
text:
type: string
title: Text
type: object
required:
- text
title: TextContentItem
description: A text content item.
ToolCall:
properties:
call_id:
type: string
title: Call Id
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
type: string
title: Arguments
type: object
required:
- call_id
- tool_name
- arguments
title: ToolCall
ToolChoice:
type: string
enum:
- auto
- required
- none
title: ToolChoice
description: Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model.
ToolConfig:
properties:
tool_choice:
anyOf:
- $ref: '#/components/schemas/ToolChoice'
- type: string
- type: 'null'
title: Tool Choice
default: auto
tool_prompt_format:
anyOf:
- $ref: '#/components/schemas/ToolPromptFormat'
- type: 'null'
system_message_behavior:
anyOf:
- $ref: '#/components/schemas/SystemMessageBehavior'
- type: 'null'
default: append
type: object
title: ToolConfig
description: "Configuration for tool use.\n\n- `ToolPromptFormat.json`: The tool calls are formatted as a JSON object.\n- `ToolPromptFormat.function_tag`: The tool calls are enclosed in a <function=function_name> tag.\n- `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls.\n- `SystemMessageBehavior.append`: Appends the provided system message to the default system prompt.\n- `SystemMessageBehavior.replace`: Replaces the default system prompt with the provided system message. The system message can include the string\n '{{function_definitions}}' to indicate where the function definitions should be inserted."
ToolDef:
properties:
toolgroup_id:
anyOf:
- type: string
- type: 'null'
title: Toolgroup Id
description: ID of the tool group this tool belongs to
name:
type: string
title: Name
description: Name of the tool
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Human-readable description of what the tool does
input_schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Input Schema
description: JSON Schema for tool inputs (MCP inputSchema)
output_schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Output Schema
description: JSON Schema for tool outputs (MCP outputSchema)
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
description: Additional metadata about the tool
type: object
required:
- name
title: ToolDef
description: Tool definition used in runtime contexts.
ToolExecutionStep-Input:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: tool_execution
title: Step Type
default: tool_execution
tool_calls:
items:
$ref: '#/components/schemas/ToolCall'
type: array
title: Tool Calls
description: The tool calls to execute.
tool_responses:
items:
$ref: '#/components/schemas/ToolResponse-Input'
type: array
title: Tool Responses
description: The tool responses from the tool calls.
type: object
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
description: A tool execution step in an agent turn.
ToolExecutionStep-Output:
properties:
turn_id:
type: string
title: Turn Id
description: The ID of the turn.
step_id:
type: string
title: Step Id
description: The ID of the step.
started_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Started At
description: The time the step started.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: The time the step completed.
step_type:
type: string
const: tool_execution
title: Step Type
default: tool_execution
tool_calls:
items:
$ref: '#/components/schemas/ToolCall'
type: array
title: Tool Calls
description: The tool calls to execute.
tool_responses:
items:
$ref: '#/components/schemas/ToolResponse-Output'
type: array
title: Tool Responses
description: The tool responses from the tool calls.
type: object
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
description: A tool execution step in an agent turn.
ToolGroup:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for this resource in llama stack
provider_resource_id:
anyOf:
- type: string
- type: 'null'
title: Provider Resource Id
description: Unique identifier for this resource in the provider
provider_id:
type: string
title: Provider Id
description: ID of the provider that owns this resource
type:
type: string
const: tool_group
title: Type
description: Type of resource, always 'tool_group'
default: tool_group
mcp_endpoint:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
description: Model Context Protocol endpoint for remote tools
args:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Args
description: Additional arguments for the tool group
type: object
required:
- identifier
- provider_id
title: ToolGroup
description: A group of related tools managed together.
ToolInvocationResult:
properties:
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Content
description: The output content from the tool execution
error_message:
anyOf:
- type: string
- type: 'null'
title: Error Message
description: Error message if the tool execution failed
error_code:
anyOf:
- type: integer
- type: 'null'
title: Error Code
description: Numeric error code if the tool execution failed
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
description: Additional metadata about the tool execution
type: object
title: ToolInvocationResult
description: Result of a tool invocation.
ToolPromptFormat:
type: string
enum:
- json
- function_tag
- python_list
title: ToolPromptFormat
description: "Prompt format for calling custom / zero shot tools.\n\n:cvar json: JSON format for calling tools. It takes the form:\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n:cvar function_tag: Function tag format, pseudo-XML. This looks like:\n <function=function_name>(parameters)</function>\n\n:cvar python_list: Python list. The output is a valid Python expression that can be\n evaluated to a list. Each element in the list is a function call. Example:\n [\"function_name(param1, param2)\", \"function_name(param1, param2)\"]"
ToolResponse-Input:
properties:
call_id:
type: string
title: Call Id
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
type: object
required:
- call_id
- tool_name
- content
title: ToolResponse
description: Response from a tool invocation.
ToolResponse-Output:
properties:
call_id:
type: string
title: Call Id
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
type: object
required:
- call_id
- tool_name
- content
title: ToolResponse
description: Response from a tool invocation.
ToolResponseMessage-Input:
properties:
role:
type: string
const: tool
title: Role
default: tool
call_id:
type: string
title: Call Id
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
type: object
required:
- call_id
- content
title: ToolResponseMessage
description: A message representing the result of a tool invocation.
ToolResponseMessage-Output:
properties:
role:
type: string
const: tool
title: Role
default: tool
call_id:
type: string
title: Call Id
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
type: object
required:
- call_id
- content
title: ToolResponseMessage
description: A message representing the result of a tool invocation.
TopKSamplingStrategy:
properties:
type:
type: string
const: top_k
title: Type
default: top_k
top_k:
type: integer
minimum: 1.0
title: Top K
type: object
required:
- top_k
title: TopKSamplingStrategy
description: Top-k sampling strategy that restricts sampling to the k most likely tokens.
TopPSamplingStrategy:
properties:
type:
type: string
const: top_p
title: Type
default: top_p
temperature:
anyOf:
- type: number
minimum: 0.0
- type: 'null'
title: Temperature
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
default: 0.95
type: object
required:
- temperature
title: TopPSamplingStrategy
description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.
TrainingConfig:
properties:
n_epochs:
type: integer
title: N Epochs
max_steps_per_epoch:
type: integer
title: Max Steps Per Epoch
default: 1
gradient_accumulation_steps:
type: integer
title: Gradient Accumulation Steps
default: 1
max_validation_steps:
anyOf:
- type: integer
- type: 'null'
title: Max Validation Steps
default: 1
data_config:
anyOf:
- $ref: '#/components/schemas/DataConfig'
- type: 'null'
optimizer_config:
anyOf:
- $ref: '#/components/schemas/OptimizerConfig'
- type: 'null'
efficiency_config:
anyOf:
- $ref: '#/components/schemas/EfficiencyConfig'
- type: 'null'
dtype:
anyOf:
- type: string
- type: 'null'
title: Dtype
default: bf16
type: object
required:
- n_epochs
title: TrainingConfig
description: Comprehensive configuration for the training process.
Turn:
properties:
turn_id:
type: string
title: Turn Id
description: Unique identifier for the turn within a session
session_id:
type: string
title: Session Id
description: Unique identifier for the conversation session
input_messages:
items:
anyOf:
- $ref: '#/components/schemas/UserMessage-Output'
- $ref: '#/components/schemas/ToolResponseMessage-Output'
type: array
title: Input Messages
description: List of messages that initiated this turn
steps:
items:
oneOf:
- $ref: '#/components/schemas/InferenceStep-Output'
- $ref: '#/components/schemas/ToolExecutionStep-Output'
- $ref: '#/components/schemas/ShieldCallStep-Output'
- $ref: '#/components/schemas/MemoryRetrievalStep-Output'
discriminator:
propertyName: step_type
mapping:
inference: '#/components/schemas/InferenceStep-Output'
memory_retrieval: '#/components/schemas/MemoryRetrievalStep-Output'
shield_call: '#/components/schemas/ShieldCallStep-Output'
tool_execution: '#/components/schemas/ToolExecutionStep-Output'
type: array
title: Steps
description: Ordered list of processing steps executed during this turn
output_message:
$ref: '#/components/schemas/CompletionMessage-Output'
description: The model's generated response containing content and metadata
output_attachments:
anyOf:
- items:
$ref: '#/components/schemas/Attachment-Output'
type: array
- type: 'null'
title: Output Attachments
description: Files or media attached to the agent's response
started_at:
type: string
format: date-time
title: Started At
description: Timestamp when the turn began
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: Timestamp when the turn finished, if completed
type: object
required:
- turn_id
- session_id
- input_messages
- steps
- output_message
- started_at
title: Turn
description: A single turn in an interaction with an Agentic System.
URIDataSource:
properties:
type:
type: string
const: uri
title: Type
description: The type of data source
default: uri
uri:
type: string
title: Uri
description: The dataset can be obtained from a URI. E.g. 'https://mywebsite.com/mydata.jsonl', 'lsfs://mydata.jsonl', 'data:csv;base64,{base64_content}'
type: object
required:
- uri
title: URIDataSource
description: A dataset that can be obtained from a URI.
URL:
properties:
uri:
type: string
title: Uri
type: object
required:
- uri
title: URL
description: A URL reference to external content.
UnionType:
properties:
type:
type: string
const: union
title: Type
default: union
type: object
title: UnionType
description: "Parameter type for union values.\n\n:param type: Discriminator type. Always \"union\""
UpdatePromptRequest:
properties:
prompt:
type: string
title: Prompt
description: The updated prompt text content.
version:
type: integer
title: Version
description: The current version of the prompt being updated.
variables:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Variables
description: Updated list of variable names that can be used in the prompt template.
set_as_default:
type: boolean
title: Set As Default
description: Set the new version as the default (default=True).
default: true
type: object
required:
- prompt
- version
title: UpdatePromptRequest
description: Request model for updating an existing prompt.
UserMessage-Input:
properties:
role:
type: string
const: user
title: Role
default: user
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Input'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Input'
text: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
type: object
required:
- content
title: UserMessage
description: A message from the user in a chat conversation.
UserMessage-Output:
properties:
role:
type: string
const: user
title: Role
default: user
content:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
- items:
oneOf:
- $ref: '#/components/schemas/ImageContentItem-Output'
- $ref: '#/components/schemas/TextContentItem'
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageContentItem-Output'
text: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
type: object
required:
- content
title: UserMessage
description: A message from the user in a chat conversation.
VectorStoreChunkingStrategyAuto:
properties:
type:
type: string
const: auto
title: Type
default: auto
type: object
title: VectorStoreChunkingStrategyAuto
description: Automatic chunking strategy for vector store files.
VectorStoreChunkingStrategyStatic:
properties:
type:
type: string
const: static
title: Type
default: static
static:
$ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig'
type: object
required:
- static
title: VectorStoreChunkingStrategyStatic
description: Static chunking strategy with configurable parameters.
VectorStoreChunkingStrategyStaticConfig:
properties:
chunk_overlap_tokens:
type: integer
title: Chunk Overlap Tokens
default: 400
max_chunk_size_tokens:
type: integer
maximum: 4096.0
minimum: 100.0
title: Max Chunk Size Tokens
default: 800
type: object
title: VectorStoreChunkingStrategyStaticConfig
description: Configuration for static chunking strategy.
VectorStoreContent:
properties:
type:
type: string
const: text
title: Type
text:
type: string
title: Text
type: object
required:
- type
- text
title: VectorStoreContent
description: Content item from a vector store file or search result.
VectorStoreDeleteResponse:
properties:
id:
type: string
title: Id
object:
type: string
title: Object
default: vector_store.deleted
deleted:
type: boolean
title: Deleted
default: true
type: object
required:
- id
title: VectorStoreDeleteResponse
description: Response from deleting a vector store.
VectorStoreFileBatchObject:
properties:
id:
type: string
title: Id
object:
type: string
title: Object
default: vector_store.file_batch
created_at:
type: integer
title: Created At
vector_store_id:
type: string
title: Vector Store Id
status:
anyOf:
- type: string
const: completed
- type: string
const: in_progress
- type: string
const: cancelled
- type: string
const: failed
title: Status
file_counts:
$ref: '#/components/schemas/VectorStoreFileCounts'
type: object
required:
- id
- created_at
- vector_store_id
- status
- file_counts
title: VectorStoreFileBatchObject
description: OpenAI Vector Store File Batch object.
VectorStoreFileContentsResponse:
properties:
file_id:
type: string
title: File Id
filename:
type: string
title: Filename
attributes:
additionalProperties: true
type: object
title: Attributes
content:
items:
$ref: '#/components/schemas/VectorStoreContent'
type: array
title: Content
type: object
required:
- file_id
- filename
- attributes
- content
title: VectorStoreFileContentsResponse
description: Response from retrieving the contents of a vector store file.
VectorStoreFileCounts:
properties:
completed:
type: integer
title: Completed
cancelled:
type: integer
title: Cancelled
failed:
type: integer
title: Failed
in_progress:
type: integer
title: In Progress
total:
type: integer
title: Total
type: object
required:
- completed
- cancelled
- failed
- in_progress
- total
title: VectorStoreFileCounts
description: File processing status counts for a vector store.
VectorStoreFileDeleteResponse:
properties:
id:
type: string
title: Id
object:
type: string
title: Object
default: vector_store.file.deleted
deleted:
type: boolean
title: Deleted
default: true
type: object
required:
- id
title: VectorStoreFileDeleteResponse
description: Response from deleting a vector store file.
VectorStoreFileLastError:
properties:
code:
anyOf:
- type: string
const: server_error
- type: string
const: rate_limit_exceeded
title: Code
message:
type: string
title: Message
type: object
required:
- code
- message
title: VectorStoreFileLastError
description: Error information for failed vector store file processing.
VectorStoreFileObject:
properties:
id:
type: string
title: Id
object:
type: string
title: Object
default: vector_store.file
attributes:
additionalProperties: true
type: object
title: Attributes
chunking_strategy:
oneOf:
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
title: Chunking Strategy
discriminator:
propertyName: type
mapping:
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
created_at:
type: integer
title: Created At
last_error:
anyOf:
- $ref: '#/components/schemas/VectorStoreFileLastError'
- type: 'null'
status:
anyOf:
- type: string
const: completed
- type: string
const: in_progress
- type: string
const: cancelled
- type: string
const: failed
title: Status
usage_bytes:
type: integer
title: Usage Bytes
default: 0
vector_store_id:
type: string
title: Vector Store Id
type: object
required:
- id
- chunking_strategy
- created_at
- status
- vector_store_id
title: VectorStoreFileObject
description: OpenAI Vector Store File object.
VectorStoreFilesListInBatchResponse:
properties:
object:
type: string
title: Object
default: list
data:
items:
$ref: '#/components/schemas/VectorStoreFileObject'
type: array
title: Data
first_id:
anyOf:
- type: string
- type: 'null'
title: First Id
last_id:
anyOf:
- type: string
- type: 'null'
title: Last Id
has_more:
type: boolean
title: Has More
default: false
type: object
required:
- data
title: VectorStoreFilesListInBatchResponse
description: Response from listing files in a vector store file batch.
VectorStoreListFilesResponse:
properties:
object:
type: string
title: Object
default: list
data:
items:
$ref: '#/components/schemas/VectorStoreFileObject'
type: array
title: Data
first_id:
anyOf:
- type: string
- type: 'null'
title: First Id
last_id:
anyOf:
- type: string
- type: 'null'
title: Last Id
has_more:
type: boolean
title: Has More
default: false
type: object
required:
- data
title: VectorStoreListFilesResponse
description: Response from listing files in a vector store.
VectorStoreListResponse:
properties:
object:
type: string
title: Object
default: list
data:
items:
$ref: '#/components/schemas/VectorStoreObject'
type: array
title: Data
first_id:
anyOf:
- type: string
- type: 'null'
title: First Id
last_id:
anyOf:
- type: string
- type: 'null'
title: Last Id
has_more:
type: boolean
title: Has More
default: false
type: object
required:
- data
title: VectorStoreListResponse
description: Response from listing vector stores.
VectorStoreModifyRequest:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
expires_after:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Expires After
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
type: object
title: VectorStoreModifyRequest
description: Request to modify a vector store.
VectorStoreObject:
properties:
id:
type: string
title: Id
object:
type: string
title: Object
default: vector_store
created_at:
type: integer
title: Created At
name:
anyOf:
- type: string
- type: 'null'
title: Name
usage_bytes:
type: integer
title: Usage Bytes
default: 0
file_counts:
$ref: '#/components/schemas/VectorStoreFileCounts'
status:
type: string
title: Status
default: completed
expires_after:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Expires After
expires_at:
anyOf:
- type: integer
- type: 'null'
title: Expires At
last_active_at:
anyOf:
- type: integer
- type: 'null'
title: Last Active At
metadata:
additionalProperties: true
type: object
title: Metadata
type: object
required:
- id
- created_at
- file_counts
title: VectorStoreObject
description: OpenAI Vector Store object.
VectorStoreSearchResponse:
properties:
file_id:
type: string
title: File Id
filename:
type: string
title: Filename
score:
type: number
title: Score
attributes:
anyOf:
- additionalProperties:
anyOf:
- type: string
- type: number
- type: boolean
type: object
- type: 'null'
title: Attributes
content:
items:
$ref: '#/components/schemas/VectorStoreContent'
type: array
title: Content
type: object
required:
- file_id
- filename
- score
- content
title: VectorStoreSearchResponse
description: Response from searching a vector store.
VectorStoreSearchResponsePage:
properties:
object:
type: string
title: Object
default: vector_store.search_results.page
search_query:
type: string
title: Search Query
data:
items:
$ref: '#/components/schemas/VectorStoreSearchResponse'
type: array
title: Data
has_more:
type: boolean
title: Has More
default: false
next_page:
anyOf:
- type: string
- type: 'null'
title: Next Page
type: object
required:
- search_query
- data
title: VectorStoreSearchResponsePage
description: Paginated response from searching a vector store.
VersionInfo:
properties:
version:
type: string
title: Version
description: Version number of the service
type: object
required:
- version
title: VersionInfo
description: Version information for the service.
ViolationLevel:
type: string
enum:
- info
- warn
- error
title: ViolationLevel
description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention"
WeightedRanker:
properties:
type:
type: string
const: weighted
title: Type
default: weighted
alpha:
type: number
maximum: 1.0
minimum: 0.0
title: Alpha
description: Weight factor between 0 and 1. 0 means only keyword scores, 1 means only vector scores.
default: 0.5
type: object
title: WeightedRanker
description: "Weighted ranker configuration that combines vector and keyword scores.\n\n:param type: The type of ranker, always \"weighted\"\n:param alpha: Weight factor between 0 and 1.\n 0 means only use keyword scores,\n 1 means only use vector scores,\n values in between blend both scores."
_URLOrData:
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
type: object
title: _URLOrData
description: A URL or a base64 encoded string.
AgentConfig:
$defs:
AgentToolGroupWithArgs:
properties:
name:
title: Name
type: string
args:
additionalProperties: true
title: Args
type: object
required:
- name
- args
title: AgentToolGroupWithArgs
type: object
GrammarResponseFormat:
description: Configuration for grammar-guided response generation.
properties:
type:
const: grammar
default: grammar
title: Type
type: string
bnf:
additionalProperties: true
title: Bnf
type: object
required:
- bnf
title: GrammarResponseFormat
type: object
GreedySamplingStrategy:
description: Greedy sampling strategy that selects the highest probability token at each step.
properties:
type:
const: greedy
default: greedy
title: Type
type: string
title: GreedySamplingStrategy
type: object
JsonSchemaResponseFormat:
description: Configuration for JSON schema-guided response generation.
properties:
type:
const: json_schema
default: json_schema
title: Type
type: string
json_schema:
additionalProperties: true
title: Json Schema
type: object
required:
- json_schema
title: JsonSchemaResponseFormat
type: object
SamplingParams:
description: Sampling parameters.
properties:
strategy:
discriminator:
mapping:
greedy: '#/$defs/GreedySamplingStrategy'
top_k: '#/$defs/TopKSamplingStrategy'
top_p: '#/$defs/TopPSamplingStrategy'
propertyName: type
oneOf:
- $ref: '#/components/schemas/GreedySamplingStrategy'
- $ref: '#/components/schemas/TopPSamplingStrategy'
- $ref: '#/components/schemas/TopKSamplingStrategy'
title: Strategy
max_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Tokens
repetition_penalty:
anyOf:
- type: number
- type: 'null'
default: 1.0
title: Repetition Penalty
stop:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Stop
title: SamplingParams
type: object
SystemMessageBehavior:
description: "Config for how to override the default system prompt.\n\nhttps://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt-\n'{{function_definitions}}' to indicate where the function definitions should be inserted."
enum:
- append
- replace
title: SystemMessageBehavior
type: string
ToolChoice:
description: Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model.
enum:
- auto
- required
- none
title: ToolChoice
type: string
ToolConfig:
description: "Configuration for tool use.\n\n- `ToolPromptFormat.json`: The tool calls are formatted as a JSON object.\n- `ToolPromptFormat.function_tag`: The tool calls are enclosed in a <function=function_name> tag.\n- `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls.\n- `SystemMessageBehavior.append`: Appends the provided system message to the default system prompt.\n- `SystemMessageBehavior.replace`: Replaces the default system prompt with the provided system message. The system message can include the string\n '{{function_definitions}}' to indicate where the function definitions should be inserted."
properties:
tool_choice:
anyOf:
- $ref: '#/components/schemas/ToolChoice'
- type: string
- type: 'null'
default: auto
title: Tool Choice
tool_prompt_format:
anyOf:
- $ref: '#/components/schemas/ToolPromptFormat'
- type: 'null'
system_message_behavior:
anyOf:
- $ref: '#/components/schemas/SystemMessageBehavior'
- type: 'null'
default: append
title: ToolConfig
type: object
ToolDef:
description: Tool definition used in runtime contexts.
properties:
toolgroup_id:
anyOf:
- type: string
- type: 'null'
description: ID of the tool group this tool belongs to
title: Toolgroup Id
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Human-readable description of what the tool does
title: Description
input_schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON Schema for tool inputs (MCP inputSchema)
title: Input Schema
output_schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON Schema for tool outputs (MCP outputSchema)
title: Output Schema
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional metadata about the tool
title: Metadata
required:
- name
title: ToolDef
type: object
ToolPromptFormat:
description: "Prompt format for calling custom / zero shot tools.\n\n:cvar json: JSON format for calling tools. It takes the form:\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n:cvar function_tag: Function tag format, pseudo-XML. This looks like:\n <function=function_name>(parameters)</function>\n\n:cvar python_list: Python list. The output is a valid Python expression that can be\n evaluated to a list. Each element in the list is a function call. Example:\n [\"function_name(param1, param2)\", \"function_name(param1, param2)\"]"
enum:
- json
- function_tag
- python_list
title: ToolPromptFormat
type: string
TopKSamplingStrategy:
description: Top-k sampling strategy that restricts sampling to the k most likely tokens.
properties:
type:
const: top_k
default: top_k
title: Type
type: string
top_k:
minimum: 1
title: Top K
type: integer
required:
- top_k
title: TopKSamplingStrategy
type: object
TopPSamplingStrategy:
description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.
properties:
type:
const: top_p
default: top_p
title: Type
type: string
temperature:
anyOf:
- type: number
minimum: 0.0
- type: 'null'
title: Temperature
top_p:
anyOf:
- type: number
- type: 'null'
default: 0.95
title: Top P
required:
- temperature
title: TopPSamplingStrategy
type: object
description: Configuration for an agent.
properties:
sampling_params:
anyOf:
- $ref: '#/components/schemas/SamplingParams'
- type: 'null'
input_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Input Shields
output_shields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Output Shields
toolgroups:
anyOf:
- items:
anyOf:
- type: string
- $ref: '#/components/schemas/AgentToolGroupWithArgs'
type: array
- type: 'null'
title: Toolgroups
client_tools:
anyOf:
- items:
$ref: '#/components/schemas/ToolDef'
type: array
- type: 'null'
title: Client Tools
tool_choice:
anyOf:
- $ref: '#/components/schemas/ToolChoice'
- type: 'null'
deprecated: true
tool_prompt_format:
anyOf:
- $ref: '#/components/schemas/ToolPromptFormat'
- type: 'null'
deprecated: true
tool_config:
anyOf:
- $ref: '#/components/schemas/ToolConfig'
- type: 'null'
max_infer_iters:
anyOf:
- type: integer
- type: 'null'
default: 10
title: Max Infer Iters
model:
description: The model identifier to use for the agent
title: Model
type: string
instructions:
description: The system instructions for the agent
title: Instructions
type: string
name:
anyOf:
- type: string
- type: 'null'
description: Optional name for the agent, used in telemetry and identification
title: Name
enable_session_persistence:
anyOf:
- type: boolean
- type: 'null'
default: false
description: Optional flag indicating whether session data has to be persisted
title: Enable Session Persistence
response_format:
anyOf:
- discriminator:
mapping:
grammar: '#/$defs/GrammarResponseFormat'
json_schema: '#/$defs/JsonSchemaResponseFormat'
propertyName: type
oneOf:
- $ref: '#/components/schemas/JsonSchemaResponseFormat'
- $ref: '#/components/schemas/GrammarResponseFormat'
- type: 'null'
description: Optional response format configuration
title: Response Format
required:
- model
- instructions
title: AgentConfig
type: object
AgentTurnResponseEvent:
$defs:
AgentTurnResponseStepCompletePayload:
description: Payload for step completion events in agent turn responses.
properties:
event_type:
const: step_complete
default: step_complete
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
step_details:
description: Complete details of the executed step
discriminator:
mapping:
inference: '#/$defs/InferenceStep'
memory_retrieval: '#/$defs/MemoryRetrievalStep'
shield_call: '#/$defs/ShieldCallStep'
tool_execution: '#/$defs/ToolExecutionStep'
propertyName: step_type
oneOf:
- $ref: '#/components/schemas/InferenceStep'
- $ref: '#/components/schemas/ToolExecutionStep'
- $ref: '#/components/schemas/ShieldCallStep'
- $ref: '#/components/schemas/MemoryRetrievalStep'
title: Step Details
required:
- step_type
- step_id
- step_details
title: AgentTurnResponseStepCompletePayload
type: object
AgentTurnResponseStepProgressPayload:
description: Payload for step progress events in agent turn responses.
properties:
event_type:
const: step_progress
default: step_progress
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
delta:
description: Incremental content changes during step execution
discriminator:
mapping:
image: '#/$defs/ImageDelta'
text: '#/$defs/TextDelta'
tool_call: '#/$defs/ToolCallDelta'
propertyName: type
oneOf:
- $ref: '#/components/schemas/TextDelta'
- $ref: '#/components/schemas/ImageDelta'
- $ref: '#/components/schemas/ToolCallDelta'
title: Delta
required:
- step_type
- step_id
- delta
title: AgentTurnResponseStepProgressPayload
type: object
AgentTurnResponseStepStartPayload:
description: Payload for step start events in agent turn responses.
properties:
event_type:
const: step_start
default: step_start
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional metadata for the step
title: Metadata
required:
- step_type
- step_id
title: AgentTurnResponseStepStartPayload
type: object
AgentTurnResponseTurnAwaitingInputPayload:
description: Payload for turn awaiting input events in agent turn responses.
properties:
event_type:
const: turn_awaiting_input
default: turn_awaiting_input
description: Type of event being reported
title: Event Type
type: string
turn:
$ref: '#/components/schemas/Turn'
description: Turn data when waiting for external tool responses
required:
- turn
title: AgentTurnResponseTurnAwaitingInputPayload
type: object
AgentTurnResponseTurnCompletePayload:
description: Payload for turn completion events in agent turn responses.
properties:
event_type:
const: turn_complete
default: turn_complete
description: Type of event being reported
title: Event Type
type: string
turn:
$ref: '#/components/schemas/Turn'
description: Complete turn data including all steps and results
required:
- turn
title: AgentTurnResponseTurnCompletePayload
type: object
AgentTurnResponseTurnStartPayload:
description: Payload for turn start events in agent turn responses.
properties:
event_type:
const: turn_start
default: turn_start
description: Type of event being reported
title: Event Type
type: string
turn_id:
description: Unique identifier for the turn within a session
title: Turn Id
type: string
required:
- turn_id
title: AgentTurnResponseTurnStartPayload
type: object
Attachment:
description: An attachment to an agent turn.
properties:
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
description: The content of the attachment.
title: Content
mime_type:
description: The MIME type of the attachment.
title: Mime Type
type: string
required:
- content
- mime_type
title: Attachment
type: object
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
ImageDelta:
description: An image content delta for streaming responses.
properties:
type:
const: image
default: image
title: Type
type: string
image:
format: binary
title: Image
type: string
required:
- image
title: ImageDelta
type: object
InferenceStep:
description: An inference step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: inference
default: inference
title: Step Type
type: string
model_response:
$ref: '#/components/schemas/CompletionMessage'
description: The response from the LLM.
required:
- turn_id
- step_id
- model_response
title: InferenceStep
type: object
MemoryRetrievalStep:
description: A memory retrieval step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: memory_retrieval
default: memory_retrieval
title: Step Type
type: string
vector_store_ids:
description: The IDs of the vector databases to retrieve context from.
title: Vector Store Ids
type: string
inserted_context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
description: The context retrieved from the vector databases.
title: Inserted Context
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
type: object
SafetyViolation:
description: Details of a safety violation detected by content moderation.
properties:
violation_level:
$ref: '#/components/schemas/ViolationLevel'
description: Severity level of the violation.
user_message:
anyOf:
- type: string
- type: 'null'
description: Message to convey to the user about the violation.
title: User Message
metadata:
additionalProperties: true
description: Additional metadata including specific violation codes for debugging and telemetry.
title: Metadata
type: object
required:
- violation_level
title: SafetyViolation
type: object
ShieldCallStep:
description: A shield call step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: shield_call
default: shield_call
title: Step Type
type: string
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
required:
- turn_id
- step_id
title: ShieldCallStep
type: object
StepType:
description: Type of the step in an agent turn.
enum:
- inference
- tool_execution
- shield_call
- memory_retrieval
title: StepType
type: string
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
TextDelta:
description: A text content delta for streaming responses.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextDelta
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolCallDelta:
description: A tool call content delta for streaming responses.
properties:
type:
const: tool_call
default: tool_call
title: Type
type: string
tool_call:
anyOf:
- type: string
- $ref: '#/components/schemas/ToolCall'
title: Tool Call
parse_status:
$ref: '#/components/schemas/ToolCallParseStatus'
required:
- tool_call
- parse_status
title: ToolCallDelta
type: object
ToolCallParseStatus:
description: Status of tool call parsing during streaming.
enum:
- started
- in_progress
- failed
- succeeded
title: ToolCallParseStatus
type: string
ToolExecutionStep:
description: A tool execution step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: tool_execution
default: tool_execution
title: Step Type
type: string
tool_calls:
description: The tool calls to execute.
items:
$ref: '#/components/schemas/ToolCall'
title: Tool Calls
type: array
tool_responses:
description: The tool responses from the tool calls.
items:
$ref: '#/components/schemas/ToolResponse'
title: Tool Responses
type: array
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
type: object
ToolResponse:
description: Response from a tool invocation.
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
required:
- call_id
- tool_name
- content
title: ToolResponse
type: object
ToolResponseMessage:
description: A message representing the result of a tool invocation.
properties:
role:
const: tool
default: tool
title: Role
type: string
call_id:
title: Call Id
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
required:
- call_id
- content
title: ToolResponseMessage
type: object
Turn:
description: A single turn in an interaction with an Agentic System.
properties:
turn_id:
description: Unique identifier for the turn within a session
title: Turn Id
type: string
session_id:
description: Unique identifier for the conversation session
title: Session Id
type: string
input_messages:
description: List of messages that initiated this turn
items:
anyOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
title: Input Messages
type: array
steps:
description: Ordered list of processing steps executed during this turn
items:
discriminator:
mapping:
inference: '#/$defs/InferenceStep'
memory_retrieval: '#/$defs/MemoryRetrievalStep'
shield_call: '#/$defs/ShieldCallStep'
tool_execution: '#/$defs/ToolExecutionStep'
propertyName: step_type
oneOf:
- $ref: '#/components/schemas/InferenceStep'
- $ref: '#/components/schemas/ToolExecutionStep'
- $ref: '#/components/schemas/ShieldCallStep'
- $ref: '#/components/schemas/MemoryRetrievalStep'
title: Steps
type: array
output_message:
$ref: '#/components/schemas/CompletionMessage'
description: The model's generated response containing content and metadata
output_attachments:
anyOf:
- items:
$ref: '#/components/schemas/Attachment'
type: array
- type: 'null'
description: Files or media attached to the agent's response
title: Output Attachments
started_at:
description: Timestamp when the turn began
format: date-time
title: Started At
type: string
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: Timestamp when the turn finished, if completed
title: Completed At
required:
- turn_id
- session_id
- input_messages
- steps
- output_message
- started_at
title: Turn
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
UserMessage:
description: A message from the user in a chat conversation.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
required:
- content
title: UserMessage
type: object
ViolationLevel:
description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention"
enum:
- info
- warn
- error
title: ViolationLevel
type: string
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: An event in an agent turn response stream.
properties:
payload:
description: Event-specific payload containing event data
discriminator:
mapping:
step_complete: '#/$defs/AgentTurnResponseStepCompletePayload'
step_progress: '#/$defs/AgentTurnResponseStepProgressPayload'
step_start: '#/$defs/AgentTurnResponseStepStartPayload'
turn_awaiting_input: '#/$defs/AgentTurnResponseTurnAwaitingInputPayload'
turn_complete: '#/$defs/AgentTurnResponseTurnCompletePayload'
turn_start: '#/$defs/AgentTurnResponseTurnStartPayload'
propertyName: event_type
oneOf:
- $ref: '#/components/schemas/AgentTurnResponseStepStartPayload'
- $ref: '#/components/schemas/AgentTurnResponseStepProgressPayload'
- $ref: '#/components/schemas/AgentTurnResponseStepCompletePayload'
- $ref: '#/components/schemas/AgentTurnResponseTurnStartPayload'
- $ref: '#/components/schemas/AgentTurnResponseTurnCompletePayload'
- $ref: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload'
title: Payload
required:
- payload
title: AgentTurnResponseEvent
type: object
AgentTurnResponseStepCompletePayload:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
InferenceStep:
description: An inference step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: inference
default: inference
title: Step Type
type: string
model_response:
$ref: '#/components/schemas/CompletionMessage'
description: The response from the LLM.
required:
- turn_id
- step_id
- model_response
title: InferenceStep
type: object
MemoryRetrievalStep:
description: A memory retrieval step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: memory_retrieval
default: memory_retrieval
title: Step Type
type: string
vector_store_ids:
description: The IDs of the vector databases to retrieve context from.
title: Vector Store Ids
type: string
inserted_context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
description: The context retrieved from the vector databases.
title: Inserted Context
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
type: object
SafetyViolation:
description: Details of a safety violation detected by content moderation.
properties:
violation_level:
$ref: '#/components/schemas/ViolationLevel'
description: Severity level of the violation.
user_message:
anyOf:
- type: string
- type: 'null'
description: Message to convey to the user about the violation.
title: User Message
metadata:
additionalProperties: true
description: Additional metadata including specific violation codes for debugging and telemetry.
title: Metadata
type: object
required:
- violation_level
title: SafetyViolation
type: object
ShieldCallStep:
description: A shield call step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: shield_call
default: shield_call
title: Step Type
type: string
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
required:
- turn_id
- step_id
title: ShieldCallStep
type: object
StepType:
description: Type of the step in an agent turn.
enum:
- inference
- tool_execution
- shield_call
- memory_retrieval
title: StepType
type: string
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolExecutionStep:
description: A tool execution step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: tool_execution
default: tool_execution
title: Step Type
type: string
tool_calls:
description: The tool calls to execute.
items:
$ref: '#/components/schemas/ToolCall'
title: Tool Calls
type: array
tool_responses:
description: The tool responses from the tool calls.
items:
$ref: '#/components/schemas/ToolResponse'
title: Tool Responses
type: array
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
type: object
ToolResponse:
description: Response from a tool invocation.
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
required:
- call_id
- tool_name
- content
title: ToolResponse
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
ViolationLevel:
description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention"
enum:
- info
- warn
- error
title: ViolationLevel
type: string
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: Payload for step completion events in agent turn responses.
properties:
event_type:
const: step_complete
default: step_complete
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
step_details:
description: Complete details of the executed step
discriminator:
mapping:
inference: '#/$defs/InferenceStep'
memory_retrieval: '#/$defs/MemoryRetrievalStep'
shield_call: '#/$defs/ShieldCallStep'
tool_execution: '#/$defs/ToolExecutionStep'
propertyName: step_type
oneOf:
- $ref: '#/components/schemas/InferenceStep'
- $ref: '#/components/schemas/ToolExecutionStep'
- $ref: '#/components/schemas/ShieldCallStep'
- $ref: '#/components/schemas/MemoryRetrievalStep'
title: Step Details
required:
- step_type
- step_id
- step_details
title: AgentTurnResponseStepCompletePayload
type: object
AgentTurnResponseStepProgressPayload:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
ImageDelta:
description: An image content delta for streaming responses.
properties:
type:
const: image
default: image
title: Type
type: string
image:
format: binary
title: Image
type: string
required:
- image
title: ImageDelta
type: object
StepType:
description: Type of the step in an agent turn.
enum:
- inference
- tool_execution
- shield_call
- memory_retrieval
title: StepType
type: string
TextDelta:
description: A text content delta for streaming responses.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextDelta
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolCallDelta:
description: A tool call content delta for streaming responses.
properties:
type:
const: tool_call
default: tool_call
title: Type
type: string
tool_call:
anyOf:
- type: string
- $ref: '#/components/schemas/ToolCall'
title: Tool Call
parse_status:
$ref: '#/components/schemas/ToolCallParseStatus'
required:
- tool_call
- parse_status
title: ToolCallDelta
type: object
ToolCallParseStatus:
description: Status of tool call parsing during streaming.
enum:
- started
- in_progress
- failed
- succeeded
title: ToolCallParseStatus
type: string
description: Payload for step progress events in agent turn responses.
properties:
event_type:
const: step_progress
default: step_progress
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
delta:
description: Incremental content changes during step execution
discriminator:
mapping:
image: '#/$defs/ImageDelta'
text: '#/$defs/TextDelta'
tool_call: '#/$defs/ToolCallDelta'
propertyName: type
oneOf:
- $ref: '#/components/schemas/TextDelta'
- $ref: '#/components/schemas/ImageDelta'
- $ref: '#/components/schemas/ToolCallDelta'
title: Delta
required:
- step_type
- step_id
- delta
title: AgentTurnResponseStepProgressPayload
type: object
AgentTurnResponseStepStartPayload:
$defs:
StepType:
description: Type of the step in an agent turn.
enum:
- inference
- tool_execution
- shield_call
- memory_retrieval
title: StepType
type: string
description: Payload for step start events in agent turn responses.
properties:
event_type:
const: step_start
default: step_start
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional metadata for the step
title: Metadata
required:
- step_type
- step_id
title: AgentTurnResponseStepStartPayload
type: object
AgentTurnResponseStreamChunk:
$defs:
AgentTurnResponseEvent:
description: An event in an agent turn response stream.
properties:
payload:
description: Event-specific payload containing event data
discriminator:
mapping:
step_complete: '#/$defs/AgentTurnResponseStepCompletePayload'
step_progress: '#/$defs/AgentTurnResponseStepProgressPayload'
step_start: '#/$defs/AgentTurnResponseStepStartPayload'
turn_awaiting_input: '#/$defs/AgentTurnResponseTurnAwaitingInputPayload'
turn_complete: '#/$defs/AgentTurnResponseTurnCompletePayload'
turn_start: '#/$defs/AgentTurnResponseTurnStartPayload'
propertyName: event_type
oneOf:
- $ref: '#/components/schemas/AgentTurnResponseStepStartPayload'
- $ref: '#/components/schemas/AgentTurnResponseStepProgressPayload'
- $ref: '#/components/schemas/AgentTurnResponseStepCompletePayload'
- $ref: '#/components/schemas/AgentTurnResponseTurnStartPayload'
- $ref: '#/components/schemas/AgentTurnResponseTurnCompletePayload'
- $ref: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload'
title: Payload
required:
- payload
title: AgentTurnResponseEvent
type: object
AgentTurnResponseStepCompletePayload:
description: Payload for step completion events in agent turn responses.
properties:
event_type:
const: step_complete
default: step_complete
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
step_details:
description: Complete details of the executed step
discriminator:
mapping:
inference: '#/$defs/InferenceStep'
memory_retrieval: '#/$defs/MemoryRetrievalStep'
shield_call: '#/$defs/ShieldCallStep'
tool_execution: '#/$defs/ToolExecutionStep'
propertyName: step_type
oneOf:
- $ref: '#/components/schemas/InferenceStep'
- $ref: '#/components/schemas/ToolExecutionStep'
- $ref: '#/components/schemas/ShieldCallStep'
- $ref: '#/components/schemas/MemoryRetrievalStep'
title: Step Details
required:
- step_type
- step_id
- step_details
title: AgentTurnResponseStepCompletePayload
type: object
AgentTurnResponseStepProgressPayload:
description: Payload for step progress events in agent turn responses.
properties:
event_type:
const: step_progress
default: step_progress
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
delta:
description: Incremental content changes during step execution
discriminator:
mapping:
image: '#/$defs/ImageDelta'
text: '#/$defs/TextDelta'
tool_call: '#/$defs/ToolCallDelta'
propertyName: type
oneOf:
- $ref: '#/components/schemas/TextDelta'
- $ref: '#/components/schemas/ImageDelta'
- $ref: '#/components/schemas/ToolCallDelta'
title: Delta
required:
- step_type
- step_id
- delta
title: AgentTurnResponseStepProgressPayload
type: object
AgentTurnResponseStepStartPayload:
description: Payload for step start events in agent turn responses.
properties:
event_type:
const: step_start
default: step_start
description: Type of event being reported
title: Event Type
type: string
step_type:
$ref: '#/components/schemas/StepType'
description: Type of step being executed
step_id:
description: Unique identifier for the step within a turn
title: Step Id
type: string
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional metadata for the step
title: Metadata
required:
- step_type
- step_id
title: AgentTurnResponseStepStartPayload
type: object
AgentTurnResponseTurnAwaitingInputPayload:
description: Payload for turn awaiting input events in agent turn responses.
properties:
event_type:
const: turn_awaiting_input
default: turn_awaiting_input
description: Type of event being reported
title: Event Type
type: string
turn:
$ref: '#/components/schemas/Turn'
description: Turn data when waiting for external tool responses
required:
- turn
title: AgentTurnResponseTurnAwaitingInputPayload
type: object
AgentTurnResponseTurnCompletePayload:
description: Payload for turn completion events in agent turn responses.
properties:
event_type:
const: turn_complete
default: turn_complete
description: Type of event being reported
title: Event Type
type: string
turn:
$ref: '#/components/schemas/Turn'
description: Complete turn data including all steps and results
required:
- turn
title: AgentTurnResponseTurnCompletePayload
type: object
AgentTurnResponseTurnStartPayload:
description: Payload for turn start events in agent turn responses.
properties:
event_type:
const: turn_start
default: turn_start
description: Type of event being reported
title: Event Type
type: string
turn_id:
description: Unique identifier for the turn within a session
title: Turn Id
type: string
required:
- turn_id
title: AgentTurnResponseTurnStartPayload
type: object
Attachment:
description: An attachment to an agent turn.
properties:
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
description: The content of the attachment.
title: Content
mime_type:
description: The MIME type of the attachment.
title: Mime Type
type: string
required:
- content
- mime_type
title: Attachment
type: object
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
ImageDelta:
description: An image content delta for streaming responses.
properties:
type:
const: image
default: image
title: Type
type: string
image:
format: binary
title: Image
type: string
required:
- image
title: ImageDelta
type: object
InferenceStep:
description: An inference step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: inference
default: inference
title: Step Type
type: string
model_response:
$ref: '#/components/schemas/CompletionMessage'
description: The response from the LLM.
required:
- turn_id
- step_id
- model_response
title: InferenceStep
type: object
MemoryRetrievalStep:
description: A memory retrieval step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: memory_retrieval
default: memory_retrieval
title: Step Type
type: string
vector_store_ids:
description: The IDs of the vector databases to retrieve context from.
title: Vector Store Ids
type: string
inserted_context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
description: The context retrieved from the vector databases.
title: Inserted Context
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
type: object
SafetyViolation:
description: Details of a safety violation detected by content moderation.
properties:
violation_level:
$ref: '#/components/schemas/ViolationLevel'
description: Severity level of the violation.
user_message:
anyOf:
- type: string
- type: 'null'
description: Message to convey to the user about the violation.
title: User Message
metadata:
additionalProperties: true
description: Additional metadata including specific violation codes for debugging and telemetry.
title: Metadata
type: object
required:
- violation_level
title: SafetyViolation
type: object
ShieldCallStep:
description: A shield call step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: shield_call
default: shield_call
title: Step Type
type: string
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
required:
- turn_id
- step_id
title: ShieldCallStep
type: object
StepType:
description: Type of the step in an agent turn.
enum:
- inference
- tool_execution
- shield_call
- memory_retrieval
title: StepType
type: string
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
TextDelta:
description: A text content delta for streaming responses.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextDelta
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolCallDelta:
description: A tool call content delta for streaming responses.
properties:
type:
const: tool_call
default: tool_call
title: Type
type: string
tool_call:
anyOf:
- type: string
- $ref: '#/components/schemas/ToolCall'
title: Tool Call
parse_status:
$ref: '#/components/schemas/ToolCallParseStatus'
required:
- tool_call
- parse_status
title: ToolCallDelta
type: object
ToolCallParseStatus:
description: Status of tool call parsing during streaming.
enum:
- started
- in_progress
- failed
- succeeded
title: ToolCallParseStatus
type: string
ToolExecutionStep:
description: A tool execution step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: tool_execution
default: tool_execution
title: Step Type
type: string
tool_calls:
description: The tool calls to execute.
items:
$ref: '#/components/schemas/ToolCall'
title: Tool Calls
type: array
tool_responses:
description: The tool responses from the tool calls.
items:
$ref: '#/components/schemas/ToolResponse'
title: Tool Responses
type: array
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
type: object
ToolResponse:
description: Response from a tool invocation.
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
required:
- call_id
- tool_name
- content
title: ToolResponse
type: object
ToolResponseMessage:
description: A message representing the result of a tool invocation.
properties:
role:
const: tool
default: tool
title: Role
type: string
call_id:
title: Call Id
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
required:
- call_id
- content
title: ToolResponseMessage
type: object
Turn:
description: A single turn in an interaction with an Agentic System.
properties:
turn_id:
description: Unique identifier for the turn within a session
title: Turn Id
type: string
session_id:
description: Unique identifier for the conversation session
title: Session Id
type: string
input_messages:
description: List of messages that initiated this turn
items:
anyOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
title: Input Messages
type: array
steps:
description: Ordered list of processing steps executed during this turn
items:
discriminator:
mapping:
inference: '#/$defs/InferenceStep'
memory_retrieval: '#/$defs/MemoryRetrievalStep'
shield_call: '#/$defs/ShieldCallStep'
tool_execution: '#/$defs/ToolExecutionStep'
propertyName: step_type
oneOf:
- $ref: '#/components/schemas/InferenceStep'
- $ref: '#/components/schemas/ToolExecutionStep'
- $ref: '#/components/schemas/ShieldCallStep'
- $ref: '#/components/schemas/MemoryRetrievalStep'
title: Steps
type: array
output_message:
$ref: '#/components/schemas/CompletionMessage'
description: The model's generated response containing content and metadata
output_attachments:
anyOf:
- items:
$ref: '#/components/schemas/Attachment'
type: array
- type: 'null'
description: Files or media attached to the agent's response
title: Output Attachments
started_at:
description: Timestamp when the turn began
format: date-time
title: Started At
type: string
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: Timestamp when the turn finished, if completed
title: Completed At
required:
- turn_id
- session_id
- input_messages
- steps
- output_message
- started_at
title: Turn
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
UserMessage:
description: A message from the user in a chat conversation.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
required:
- content
title: UserMessage
type: object
ViolationLevel:
description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention"
enum:
- info
- warn
- error
title: ViolationLevel
type: string
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: Streamed agent turn completion response.
properties:
event:
$ref: '#/components/schemas/AgentTurnResponseEvent'
description: Individual event in the agent turn response stream
required:
- event
title: AgentTurnResponseStreamChunk
type: object
AgentTurnResponseTurnAwaitingInputPayload:
$defs:
Attachment:
description: An attachment to an agent turn.
properties:
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
description: The content of the attachment.
title: Content
mime_type:
description: The MIME type of the attachment.
title: Mime Type
type: string
required:
- content
- mime_type
title: Attachment
type: object
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
InferenceStep:
description: An inference step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: inference
default: inference
title: Step Type
type: string
model_response:
$ref: '#/components/schemas/CompletionMessage'
description: The response from the LLM.
required:
- turn_id
- step_id
- model_response
title: InferenceStep
type: object
MemoryRetrievalStep:
description: A memory retrieval step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: memory_retrieval
default: memory_retrieval
title: Step Type
type: string
vector_store_ids:
description: The IDs of the vector databases to retrieve context from.
title: Vector Store Ids
type: string
inserted_context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
description: The context retrieved from the vector databases.
title: Inserted Context
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
type: object
SafetyViolation:
description: Details of a safety violation detected by content moderation.
properties:
violation_level:
$ref: '#/components/schemas/ViolationLevel'
description: Severity level of the violation.
user_message:
anyOf:
- type: string
- type: 'null'
description: Message to convey to the user about the violation.
title: User Message
metadata:
additionalProperties: true
description: Additional metadata including specific violation codes for debugging and telemetry.
title: Metadata
type: object
required:
- violation_level
title: SafetyViolation
type: object
ShieldCallStep:
description: A shield call step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: shield_call
default: shield_call
title: Step Type
type: string
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
required:
- turn_id
- step_id
title: ShieldCallStep
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolExecutionStep:
description: A tool execution step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: tool_execution
default: tool_execution
title: Step Type
type: string
tool_calls:
description: The tool calls to execute.
items:
$ref: '#/components/schemas/ToolCall'
title: Tool Calls
type: array
tool_responses:
description: The tool responses from the tool calls.
items:
$ref: '#/components/schemas/ToolResponse'
title: Tool Responses
type: array
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
type: object
ToolResponse:
description: Response from a tool invocation.
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
required:
- call_id
- tool_name
- content
title: ToolResponse
type: object
ToolResponseMessage:
description: A message representing the result of a tool invocation.
properties:
role:
const: tool
default: tool
title: Role
type: string
call_id:
title: Call Id
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
required:
- call_id
- content
title: ToolResponseMessage
type: object
Turn:
description: A single turn in an interaction with an Agentic System.
properties:
turn_id:
description: Unique identifier for the turn within a session
title: Turn Id
type: string
session_id:
description: Unique identifier for the conversation session
title: Session Id
type: string
input_messages:
description: List of messages that initiated this turn
items:
anyOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
title: Input Messages
type: array
steps:
description: Ordered list of processing steps executed during this turn
items:
discriminator:
mapping:
inference: '#/$defs/InferenceStep'
memory_retrieval: '#/$defs/MemoryRetrievalStep'
shield_call: '#/$defs/ShieldCallStep'
tool_execution: '#/$defs/ToolExecutionStep'
propertyName: step_type
oneOf:
- $ref: '#/components/schemas/InferenceStep'
- $ref: '#/components/schemas/ToolExecutionStep'
- $ref: '#/components/schemas/ShieldCallStep'
- $ref: '#/components/schemas/MemoryRetrievalStep'
title: Steps
type: array
output_message:
$ref: '#/components/schemas/CompletionMessage'
description: The model's generated response containing content and metadata
output_attachments:
anyOf:
- items:
$ref: '#/components/schemas/Attachment'
type: array
- type: 'null'
description: Files or media attached to the agent's response
title: Output Attachments
started_at:
description: Timestamp when the turn began
format: date-time
title: Started At
type: string
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: Timestamp when the turn finished, if completed
title: Completed At
required:
- turn_id
- session_id
- input_messages
- steps
- output_message
- started_at
title: Turn
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
UserMessage:
description: A message from the user in a chat conversation.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
required:
- content
title: UserMessage
type: object
ViolationLevel:
description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention"
enum:
- info
- warn
- error
title: ViolationLevel
type: string
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: Payload for turn awaiting input events in agent turn responses.
properties:
event_type:
const: turn_awaiting_input
default: turn_awaiting_input
description: Type of event being reported
title: Event Type
type: string
turn:
$ref: '#/components/schemas/Turn'
description: Turn data when waiting for external tool responses
required:
- turn
title: AgentTurnResponseTurnAwaitingInputPayload
type: object
AgentTurnResponseTurnCompletePayload:
$defs:
Attachment:
description: An attachment to an agent turn.
properties:
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- $ref: '#/components/schemas/URL'
description: The content of the attachment.
title: Content
mime_type:
description: The MIME type of the attachment.
title: Mime Type
type: string
required:
- content
- mime_type
title: Attachment
type: object
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
InferenceStep:
description: An inference step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: inference
default: inference
title: Step Type
type: string
model_response:
$ref: '#/components/schemas/CompletionMessage'
description: The response from the LLM.
required:
- turn_id
- step_id
- model_response
title: InferenceStep
type: object
MemoryRetrievalStep:
description: A memory retrieval step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: memory_retrieval
default: memory_retrieval
title: Step Type
type: string
vector_store_ids:
description: The IDs of the vector databases to retrieve context from.
title: Vector Store Ids
type: string
inserted_context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
description: The context retrieved from the vector databases.
title: Inserted Context
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
type: object
SafetyViolation:
description: Details of a safety violation detected by content moderation.
properties:
violation_level:
$ref: '#/components/schemas/ViolationLevel'
description: Severity level of the violation.
user_message:
anyOf:
- type: string
- type: 'null'
description: Message to convey to the user about the violation.
title: User Message
metadata:
additionalProperties: true
description: Additional metadata including specific violation codes for debugging and telemetry.
title: Metadata
type: object
required:
- violation_level
title: SafetyViolation
type: object
ShieldCallStep:
description: A shield call step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: shield_call
default: shield_call
title: Step Type
type: string
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
required:
- turn_id
- step_id
title: ShieldCallStep
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolExecutionStep:
description: A tool execution step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: tool_execution
default: tool_execution
title: Step Type
type: string
tool_calls:
description: The tool calls to execute.
items:
$ref: '#/components/schemas/ToolCall'
title: Tool Calls
type: array
tool_responses:
description: The tool responses from the tool calls.
items:
$ref: '#/components/schemas/ToolResponse'
title: Tool Responses
type: array
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
type: object
ToolResponse:
description: Response from a tool invocation.
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
required:
- call_id
- tool_name
- content
title: ToolResponse
type: object
ToolResponseMessage:
description: A message representing the result of a tool invocation.
properties:
role:
const: tool
default: tool
title: Role
type: string
call_id:
title: Call Id
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
required:
- call_id
- content
title: ToolResponseMessage
type: object
Turn:
description: A single turn in an interaction with an Agentic System.
properties:
turn_id:
description: Unique identifier for the turn within a session
title: Turn Id
type: string
session_id:
description: Unique identifier for the conversation session
title: Session Id
type: string
input_messages:
description: List of messages that initiated this turn
items:
anyOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
title: Input Messages
type: array
steps:
description: Ordered list of processing steps executed during this turn
items:
discriminator:
mapping:
inference: '#/$defs/InferenceStep'
memory_retrieval: '#/$defs/MemoryRetrievalStep'
shield_call: '#/$defs/ShieldCallStep'
tool_execution: '#/$defs/ToolExecutionStep'
propertyName: step_type
oneOf:
- $ref: '#/components/schemas/InferenceStep'
- $ref: '#/components/schemas/ToolExecutionStep'
- $ref: '#/components/schemas/ShieldCallStep'
- $ref: '#/components/schemas/MemoryRetrievalStep'
title: Steps
type: array
output_message:
$ref: '#/components/schemas/CompletionMessage'
description: The model's generated response containing content and metadata
output_attachments:
anyOf:
- items:
$ref: '#/components/schemas/Attachment'
type: array
- type: 'null'
description: Files or media attached to the agent's response
title: Output Attachments
started_at:
description: Timestamp when the turn began
format: date-time
title: Started At
type: string
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: Timestamp when the turn finished, if completed
title: Completed At
required:
- turn_id
- session_id
- input_messages
- steps
- output_message
- started_at
title: Turn
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
UserMessage:
description: A message from the user in a chat conversation.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
required:
- content
title: UserMessage
type: object
ViolationLevel:
description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention"
enum:
- info
- warn
- error
title: ViolationLevel
type: string
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: Payload for turn completion events in agent turn responses.
properties:
event_type:
const: turn_complete
default: turn_complete
description: Type of event being reported
title: Event Type
type: string
turn:
$ref: '#/components/schemas/Turn'
description: Complete turn data including all steps and results
required:
- turn
title: AgentTurnResponseTurnCompletePayload
type: object
AgentTurnResponseTurnStartPayload:
description: Payload for turn start events in agent turn responses.
properties:
event_type:
const: turn_start
default: turn_start
description: Type of event being reported
title: Event Type
type: string
turn_id:
description: Unique identifier for the turn within a session
title: Turn Id
type: string
required:
- turn_id
title: AgentTurnResponseTurnStartPayload
type: object
InferenceStep:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: An inference step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: inference
default: inference
title: Step Type
type: string
model_response:
$ref: '#/components/schemas/CompletionMessage'
description: The response from the LLM.
required:
- turn_id
- step_id
- model_response
title: InferenceStep
type: object
MemoryRetrievalStep:
$defs:
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: A memory retrieval step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: memory_retrieval
default: memory_retrieval
title: Step Type
type: string
vector_store_ids:
description: The IDs of the vector databases to retrieve context from.
title: Vector Store Ids
type: string
inserted_context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
description: The context retrieved from the vector databases.
title: Inserted Context
required:
- turn_id
- step_id
- vector_store_ids
- inserted_context
title: MemoryRetrievalStep
type: object
ShieldCallStep:
$defs:
SafetyViolation:
description: Details of a safety violation detected by content moderation.
properties:
violation_level:
$ref: '#/components/schemas/ViolationLevel'
description: Severity level of the violation.
user_message:
anyOf:
- type: string
- type: 'null'
description: Message to convey to the user about the violation.
title: User Message
metadata:
additionalProperties: true
description: Additional metadata including specific violation codes for debugging and telemetry.
title: Metadata
type: object
required:
- violation_level
title: SafetyViolation
type: object
ViolationLevel:
description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention"
enum:
- info
- warn
- error
title: ViolationLevel
type: string
description: A shield call step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: shield_call
default: shield_call
title: Step Type
type: string
violation:
anyOf:
- $ref: '#/components/schemas/SafetyViolation'
- type: 'null'
description: The violation from the shield call.
required:
- turn_id
- step_id
title: ShieldCallStep
type: object
ToolExecutionStep:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolResponse:
description: Response from a tool invocation.
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
required:
- call_id
- tool_name
- content
title: ToolResponse
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: A tool execution step in an agent turn.
properties:
turn_id:
description: The ID of the turn.
title: Turn Id
type: string
step_id:
description: The ID of the step.
title: Step Id
type: string
started_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step started.
title: Started At
completed_at:
anyOf:
- format: date-time
type: string
- type: 'null'
description: The time the step completed.
title: Completed At
step_type:
const: tool_execution
default: tool_execution
title: Step Type
type: string
tool_calls:
description: The tool calls to execute.
items:
$ref: '#/components/schemas/ToolCall'
title: Tool Calls
type: array
tool_responses:
description: The tool responses from the tool calls.
items:
$ref: '#/components/schemas/ToolResponse'
title: Tool Responses
type: array
required:
- turn_id
- step_id
- tool_calls
- tool_responses
title: ToolExecutionStep
type: object
ConversationMessage:
description: OpenAI-compatible message item for conversations.
properties:
id:
description: unique identifier for this message
title: Id
type: string
content:
description: message content
items:
additionalProperties: true
type: object
title: Content
type: array
role:
description: message role
title: Role
type: string
status:
description: message status
title: Status
type: string
type:
const: message
default: message
title: Type
type: string
object:
const: message
default: message
title: Object
type: string
required:
- id
- content
- role
- status
title: ConversationMessage
type: object
Bf16QuantizationConfig:
description: Configuration for BFloat16 precision (typically no quantization).
properties:
type:
const: bf16
default: bf16
title: Type
type: string
title: Bf16QuantizationConfig
type: object
ChatCompletionRequest:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
GrammarResponseFormat:
description: Configuration for grammar-guided response generation.
properties:
type:
const: grammar
default: grammar
title: Type
type: string
bnf:
additionalProperties: true
title: Bnf
type: object
required:
- bnf
title: GrammarResponseFormat
type: object
GreedySamplingStrategy:
description: Greedy sampling strategy that selects the highest probability token at each step.
properties:
type:
const: greedy
default: greedy
title: Type
type: string
title: GreedySamplingStrategy
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
JsonSchemaResponseFormat:
description: Configuration for JSON schema-guided response generation.
properties:
type:
const: json_schema
default: json_schema
title: Type
type: string
json_schema:
additionalProperties: true
title: Json Schema
type: object
required:
- json_schema
title: JsonSchemaResponseFormat
type: object
LogProbConfig:
description: Configuration for log probability generation.
properties:
top_k:
anyOf:
- type: integer
- type: 'null'
default: 0
title: Top K
title: LogProbConfig
type: object
SamplingParams:
description: Sampling parameters.
properties:
strategy:
discriminator:
mapping:
greedy: '#/$defs/GreedySamplingStrategy'
top_k: '#/$defs/TopKSamplingStrategy'
top_p: '#/$defs/TopPSamplingStrategy'
propertyName: type
oneOf:
- $ref: '#/components/schemas/GreedySamplingStrategy'
- $ref: '#/components/schemas/TopPSamplingStrategy'
- $ref: '#/components/schemas/TopKSamplingStrategy'
title: Strategy
max_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Tokens
repetition_penalty:
anyOf:
- type: number
- type: 'null'
default: 1.0
title: Repetition Penalty
stop:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Stop
title: SamplingParams
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
SystemMessage:
description: A system message providing instructions or context to the model.
properties:
role:
const: system
default: system
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
required:
- content
title: SystemMessage
type: object
SystemMessageBehavior:
description: "Config for how to override the default system prompt.\n\nhttps://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt-\n'{{function_definitions}}' to indicate where the function definitions should be inserted."
enum:
- append
- replace
title: SystemMessageBehavior
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolChoice:
description: Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model.
enum:
- auto
- required
- none
title: ToolChoice
type: string
ToolConfig:
description: "Configuration for tool use.\n\n- `ToolPromptFormat.json`: The tool calls are formatted as a JSON object.\n- `ToolPromptFormat.function_tag`: The tool calls are enclosed in a <function=function_name> tag.\n- `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls.\n- `SystemMessageBehavior.append`: Appends the provided system message to the default system prompt.\n- `SystemMessageBehavior.replace`: Replaces the default system prompt with the provided system message. The system message can include the string\n '{{function_definitions}}' to indicate where the function definitions should be inserted."
properties:
tool_choice:
anyOf:
- $ref: '#/components/schemas/ToolChoice'
- type: string
- type: 'null'
default: auto
title: Tool Choice
tool_prompt_format:
anyOf:
- $ref: '#/components/schemas/ToolPromptFormat'
- type: 'null'
system_message_behavior:
anyOf:
- $ref: '#/components/schemas/SystemMessageBehavior'
- type: 'null'
default: append
title: ToolConfig
type: object
ToolDefinition:
properties:
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
description:
anyOf:
- type: string
- type: 'null'
title: Description
input_schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Input Schema
output_schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Output Schema
required:
- tool_name
title: ToolDefinition
type: object
ToolPromptFormat:
description: "Prompt format for calling custom / zero shot tools.\n\n:cvar json: JSON format for calling tools. It takes the form:\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n:cvar function_tag: Function tag format, pseudo-XML. This looks like:\n <function=function_name>(parameters)</function>\n\n:cvar python_list: Python list. The output is a valid Python expression that can be\n evaluated to a list. Each element in the list is a function call. Example:\n [\"function_name(param1, param2)\", \"function_name(param1, param2)\"]"
enum:
- json
- function_tag
- python_list
title: ToolPromptFormat
type: string
ToolResponseMessage:
description: A message representing the result of a tool invocation.
properties:
role:
const: tool
default: tool
title: Role
type: string
call_id:
title: Call Id
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
required:
- call_id
- content
title: ToolResponseMessage
type: object
TopKSamplingStrategy:
description: Top-k sampling strategy that restricts sampling to the k most likely tokens.
properties:
type:
const: top_k
default: top_k
title: Type
type: string
top_k:
minimum: 1
title: Top K
type: integer
required:
- top_k
title: TopKSamplingStrategy
type: object
TopPSamplingStrategy:
description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.
properties:
type:
const: top_p
default: top_p
title: Type
type: string
temperature:
anyOf:
- type: number
minimum: 0.0
- type: 'null'
title: Temperature
top_p:
anyOf:
- type: number
- type: 'null'
default: 0.95
title: Top P
required:
- temperature
title: TopPSamplingStrategy
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
UserMessage:
description: A message from the user in a chat conversation.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
required:
- content
title: UserMessage
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
properties:
messages:
items:
discriminator:
mapping:
assistant: '#/$defs/CompletionMessage'
system: '#/$defs/SystemMessage'
tool: '#/$defs/ToolResponseMessage'
user: '#/$defs/UserMessage'
propertyName: role
oneOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/SystemMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
- $ref: '#/components/schemas/CompletionMessage'
title: Messages
type: array
sampling_params:
anyOf:
- $ref: '#/components/schemas/SamplingParams'
- type: 'null'
tools:
anyOf:
- items:
$ref: '#/components/schemas/ToolDefinition'
type: array
- type: 'null'
title: Tools
tool_config:
anyOf:
- $ref: '#/components/schemas/ToolConfig'
- type: 'null'
response_format:
anyOf:
- discriminator:
mapping:
grammar: '#/$defs/GrammarResponseFormat'
json_schema: '#/$defs/JsonSchemaResponseFormat'
propertyName: type
oneOf:
- $ref: '#/components/schemas/JsonSchemaResponseFormat'
- $ref: '#/components/schemas/GrammarResponseFormat'
- type: 'null'
title: Response Format
stream:
anyOf:
- type: boolean
- type: 'null'
default: false
title: Stream
logprobs:
anyOf:
- $ref: '#/components/schemas/LogProbConfig'
- type: 'null'
required:
- messages
title: ChatCompletionRequest
type: object
ChatCompletionResponse:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
CompletionMessage:
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
MetricInResponse:
description: "A metric value included in API responses.\n:param metric: The name of the metric\n:param value: The numeric value of the metric\n:param unit: (Optional) The unit of measurement for the metric value"
properties:
metric:
title: Metric
type: string
value:
anyOf:
- type: integer
- type: number
title: Value
unit:
anyOf:
- type: string
- type: 'null'
title: Unit
required:
- metric
- value
title: MetricInResponse
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
TokenLogProbs:
description: Log probabilities for generated tokens.
properties:
logprobs_by_token:
additionalProperties:
type: number
title: Logprobs By Token
type: object
required:
- logprobs_by_token
title: TokenLogProbs
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: Response from a chat completion request.
properties:
metrics:
anyOf:
- items:
$ref: '#/components/schemas/MetricInResponse'
type: array
- type: 'null'
title: Metrics
completion_message:
$ref: '#/components/schemas/CompletionMessage'
logprobs:
anyOf:
- items:
$ref: '#/components/schemas/TokenLogProbs'
type: array
- type: 'null'
title: Logprobs
required:
- completion_message
title: ChatCompletionResponse
type: object
ChatCompletionResponseEvent:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
ChatCompletionResponseEventType:
description: Types of events that can occur during chat completion.
enum:
- start
- complete
- progress
title: ChatCompletionResponseEventType
type: string
ImageDelta:
description: An image content delta for streaming responses.
properties:
type:
const: image
default: image
title: Type
type: string
image:
format: binary
title: Image
type: string
required:
- image
title: ImageDelta
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextDelta:
description: A text content delta for streaming responses.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextDelta
type: object
TokenLogProbs:
description: Log probabilities for generated tokens.
properties:
logprobs_by_token:
additionalProperties:
type: number
title: Logprobs By Token
type: object
required:
- logprobs_by_token
title: TokenLogProbs
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolCallDelta:
description: A tool call content delta for streaming responses.
properties:
type:
const: tool_call
default: tool_call
title: Type
type: string
tool_call:
anyOf:
- type: string
- $ref: '#/components/schemas/ToolCall'
title: Tool Call
parse_status:
$ref: '#/components/schemas/ToolCallParseStatus'
required:
- tool_call
- parse_status
title: ToolCallDelta
type: object
ToolCallParseStatus:
description: Status of tool call parsing during streaming.
enum:
- started
- in_progress
- failed
- succeeded
title: ToolCallParseStatus
type: string
description: An event during chat completion generation.
properties:
event_type:
$ref: '#/components/schemas/ChatCompletionResponseEventType'
delta:
discriminator:
mapping:
image: '#/$defs/ImageDelta'
text: '#/$defs/TextDelta'
tool_call: '#/$defs/ToolCallDelta'
propertyName: type
oneOf:
- $ref: '#/components/schemas/TextDelta'
- $ref: '#/components/schemas/ImageDelta'
- $ref: '#/components/schemas/ToolCallDelta'
title: Delta
logprobs:
anyOf:
- items:
$ref: '#/components/schemas/TokenLogProbs'
type: array
- type: 'null'
title: Logprobs
stop_reason:
anyOf:
- $ref: '#/components/schemas/StopReason'
- type: 'null'
required:
- event_type
- delta
title: ChatCompletionResponseEvent
type: object
ChatCompletionResponseStreamChunk:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
ChatCompletionResponseEvent:
description: An event during chat completion generation.
properties:
event_type:
$ref: '#/components/schemas/ChatCompletionResponseEventType'
delta:
discriminator:
mapping:
image: '#/$defs/ImageDelta'
text: '#/$defs/TextDelta'
tool_call: '#/$defs/ToolCallDelta'
propertyName: type
oneOf:
- $ref: '#/components/schemas/TextDelta'
- $ref: '#/components/schemas/ImageDelta'
- $ref: '#/components/schemas/ToolCallDelta'
title: Delta
logprobs:
anyOf:
- items:
$ref: '#/components/schemas/TokenLogProbs'
type: array
- type: 'null'
title: Logprobs
stop_reason:
anyOf:
- $ref: '#/components/schemas/StopReason'
- type: 'null'
required:
- event_type
- delta
title: ChatCompletionResponseEvent
type: object
ChatCompletionResponseEventType:
description: Types of events that can occur during chat completion.
enum:
- start
- complete
- progress
title: ChatCompletionResponseEventType
type: string
ImageDelta:
description: An image content delta for streaming responses.
properties:
type:
const: image
default: image
title: Type
type: string
image:
format: binary
title: Image
type: string
required:
- image
title: ImageDelta
type: object
MetricInResponse:
description: "A metric value included in API responses.\n:param metric: The name of the metric\n:param value: The numeric value of the metric\n:param unit: (Optional) The unit of measurement for the metric value"
properties:
metric:
title: Metric
type: string
value:
anyOf:
- type: integer
- type: number
title: Value
unit:
anyOf:
- type: string
- type: 'null'
title: Unit
required:
- metric
- value
title: MetricInResponse
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextDelta:
description: A text content delta for streaming responses.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextDelta
type: object
TokenLogProbs:
description: Log probabilities for generated tokens.
properties:
logprobs_by_token:
additionalProperties:
type: number
title: Logprobs By Token
type: object
required:
- logprobs_by_token
title: TokenLogProbs
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolCallDelta:
description: A tool call content delta for streaming responses.
properties:
type:
const: tool_call
default: tool_call
title: Type
type: string
tool_call:
anyOf:
- type: string
- $ref: '#/components/schemas/ToolCall'
title: Tool Call
parse_status:
$ref: '#/components/schemas/ToolCallParseStatus'
required:
- tool_call
- parse_status
title: ToolCallDelta
type: object
ToolCallParseStatus:
description: Status of tool call parsing during streaming.
enum:
- started
- in_progress
- failed
- succeeded
title: ToolCallParseStatus
type: string
description: A chunk of a streamed chat completion response.
properties:
metrics:
anyOf:
- items:
$ref: '#/components/schemas/MetricInResponse'
type: array
- type: 'null'
title: Metrics
event:
$ref: '#/components/schemas/ChatCompletionResponseEvent'
required:
- event
title: ChatCompletionResponseStreamChunk
type: object
CompletionMessage:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: "A message containing the model's (assistant) response in a chat conversation.\n\n- `StopReason.end_of_turn`: The model finished generating the entire response.\n- `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n- `StopReason.out_of_tokens`: The model ran out of token budget."
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
stop_reason:
$ref: '#/components/schemas/StopReason'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ToolCall'
type: array
- type: 'null'
title: Tool Calls
required:
- content
- stop_reason
title: CompletionMessage
type: object
CompletionResponse:
$defs:
MetricInResponse:
description: "A metric value included in API responses.\n:param metric: The name of the metric\n:param value: The numeric value of the metric\n:param unit: (Optional) The unit of measurement for the metric value"
properties:
metric:
title: Metric
type: string
value:
anyOf:
- type: integer
- type: number
title: Value
unit:
anyOf:
- type: string
- type: 'null'
title: Unit
required:
- metric
- value
title: MetricInResponse
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TokenLogProbs:
description: Log probabilities for generated tokens.
properties:
logprobs_by_token:
additionalProperties:
type: number
title: Logprobs By Token
type: object
required:
- logprobs_by_token
title: TokenLogProbs
type: object
description: Response from a completion request.
properties:
metrics:
anyOf:
- items:
$ref: '#/components/schemas/MetricInResponse'
type: array
- type: 'null'
title: Metrics
content:
title: Content
type: string
stop_reason:
$ref: '#/components/schemas/StopReason'
logprobs:
anyOf:
- items:
$ref: '#/components/schemas/TokenLogProbs'
type: array
- type: 'null'
title: Logprobs
required:
- content
- stop_reason
title: CompletionResponse
type: object
CompletionResponseStreamChunk:
$defs:
MetricInResponse:
description: "A metric value included in API responses.\n:param metric: The name of the metric\n:param value: The numeric value of the metric\n:param unit: (Optional) The unit of measurement for the metric value"
properties:
metric:
title: Metric
type: string
value:
anyOf:
- type: integer
- type: number
title: Value
unit:
anyOf:
- type: string
- type: 'null'
title: Unit
required:
- metric
- value
title: MetricInResponse
type: object
StopReason:
enum:
- end_of_turn
- end_of_message
- out_of_tokens
title: StopReason
type: string
TokenLogProbs:
description: Log probabilities for generated tokens.
properties:
logprobs_by_token:
additionalProperties:
type: number
title: Logprobs By Token
type: object
required:
- logprobs_by_token
title: TokenLogProbs
type: object
description: A chunk of a streamed completion response.
properties:
metrics:
anyOf:
- items:
$ref: '#/components/schemas/MetricInResponse'
type: array
- type: 'null'
title: Metrics
delta:
title: Delta
type: string
stop_reason:
anyOf:
- $ref: '#/components/schemas/StopReason'
- type: 'null'
logprobs:
anyOf:
- items:
$ref: '#/components/schemas/TokenLogProbs'
type: array
- type: 'null'
title: Logprobs
required:
- delta
title: CompletionResponseStreamChunk
type: object
EmbeddingsResponse:
description: Response containing generated embeddings.
properties:
embeddings:
items:
items:
type: number
type: array
title: Embeddings
type: array
required:
- embeddings
title: EmbeddingsResponse
type: object
Fp8QuantizationConfig:
description: Configuration for 8-bit floating point quantization.
properties:
type:
const: fp8_mixed
default: fp8_mixed
title: Type
type: string
title: Fp8QuantizationConfig
type: object
Int4QuantizationConfig:
description: Configuration for 4-bit integer quantization.
properties:
type:
const: int4_mixed
default: int4_mixed
title: Type
type: string
scheme:
anyOf:
- type: string
- type: 'null'
default: int4_weight_int8_dynamic_activation
title: Scheme
title: Int4QuantizationConfig
type: object
OpenAIAssistantMessageParam:
$defs:
OpenAIChatCompletionContentPartTextParam:
description: Text content part for OpenAI-compatible chat completion messages.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: OpenAIChatCompletionContentPartTextParam
type: object
OpenAIChatCompletionToolCall:
description: Tool call specification for OpenAI-compatible chat completion responses.
properties:
index:
anyOf:
- type: integer
- type: 'null'
title: Index
id:
anyOf:
- type: string
- type: 'null'
title: Id
type:
const: function
default: function
title: Type
type: string
function:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction'
- type: 'null'
title: OpenAIChatCompletionToolCall
type: object
OpenAIChatCompletionToolCallFunction:
description: Function call details for OpenAI-compatible tool calls.
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
title: OpenAIChatCompletionToolCallFunction
type: object
description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
- type: 'null'
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
title: OpenAIAssistantMessageParam
type: object
OpenAIChatCompletion:
$defs:
OpenAIAssistantMessageParam:
description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
- type: 'null'
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
title: OpenAIAssistantMessageParam
type: object
OpenAIChatCompletionContentPartImageParam:
description: Image content part for OpenAI-compatible chat completion messages.
properties:
type:
const: image_url
default: image_url
title: Type
type: string
image_url:
$ref: '#/components/schemas/OpenAIImageURL'
required:
- image_url
title: OpenAIChatCompletionContentPartImageParam
type: object
OpenAIChatCompletionContentPartTextParam:
description: Text content part for OpenAI-compatible chat completion messages.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: OpenAIChatCompletionContentPartTextParam
type: object
OpenAIChatCompletionToolCall:
description: Tool call specification for OpenAI-compatible chat completion responses.
properties:
index:
anyOf:
- type: integer
- type: 'null'
title: Index
id:
anyOf:
- type: string
- type: 'null'
title: Id
type:
const: function
default: function
title: Type
type: string
function:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction'
- type: 'null'
title: OpenAIChatCompletionToolCall
type: object
OpenAIChatCompletionToolCallFunction:
description: Function call details for OpenAI-compatible tool calls.
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
title: OpenAIChatCompletionToolCallFunction
type: object
OpenAIChatCompletionUsage:
description: Usage information for OpenAI chat completion.
properties:
prompt_tokens:
title: Prompt Tokens
type: integer
completion_tokens:
title: Completion Tokens
type: integer
total_tokens:
title: Total Tokens
type: integer
prompt_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails'
- type: 'null'
completion_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails'
- type: 'null'
required:
- prompt_tokens
- completion_tokens
- total_tokens
title: OpenAIChatCompletionUsage
type: object
OpenAIChatCompletionUsageCompletionTokensDetails:
description: Token details for output tokens in OpenAI chat completion usage.
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
title: Reasoning Tokens
title: OpenAIChatCompletionUsageCompletionTokensDetails
type: object
OpenAIChatCompletionUsagePromptTokensDetails:
description: Token details for prompt tokens in OpenAI chat completion usage.
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
title: Cached Tokens
title: OpenAIChatCompletionUsagePromptTokensDetails
type: object
OpenAIChoice:
description: A choice from an OpenAI-compatible chat completion response.
properties:
message:
discriminator:
mapping:
assistant: '#/$defs/OpenAIAssistantMessageParam'
developer: '#/$defs/OpenAIDeveloperMessageParam'
system: '#/$defs/OpenAISystemMessageParam'
tool: '#/$defs/OpenAIToolMessageParam'
user: '#/$defs/OpenAIUserMessageParam'
propertyName: role
oneOf:
- $ref: '#/components/schemas/OpenAIUserMessageParam'
- $ref: '#/components/schemas/OpenAISystemMessageParam'
- $ref: '#/components/schemas/OpenAIAssistantMessageParam'
- $ref: '#/components/schemas/OpenAIToolMessageParam'
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
title: Message
finish_reason:
title: Finish Reason
type: string
index:
title: Index
type: integer
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs'
- type: 'null'
required:
- message
- finish_reason
- index
title: OpenAIChoice
type: object
OpenAIChoiceLogprobs:
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
title: OpenAIChoiceLogprobs
type: object
OpenAIDeveloperMessageParam:
description: A message from the developer in an OpenAI-compatible chat completion request.
properties:
role:
const: developer
default: developer
title: Role
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
required:
- content
title: OpenAIDeveloperMessageParam
type: object
OpenAIFile:
properties:
type:
const: file
default: file
title: Type
type: string
file:
$ref: '#/components/schemas/OpenAIFileFile'
required:
- file
title: OpenAIFile
type: object
OpenAIFileFile:
properties:
file_id:
anyOf:
- type: string
- type: 'null'
title: File Id
filename:
anyOf:
- type: string
- type: 'null'
title: Filename
title: OpenAIFileFile
type: object
OpenAIImageURL:
description: Image URL specification for OpenAI-compatible chat completion messages.
properties:
url:
title: Url
type: string
detail:
anyOf:
- type: string
- type: 'null'
title: Detail
required:
- url
title: OpenAIImageURL
type: object
OpenAISystemMessageParam:
description: A system message providing instructions or context to the model.
properties:
role:
const: system
default: system
title: Role
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
required:
- content
title: OpenAISystemMessageParam
type: object
OpenAITokenLogProb:
description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
top_logprobs:
items:
$ref: '#/components/schemas/OpenAITopLogProb'
title: Top Logprobs
type: array
required:
- token
- logprob
- top_logprobs
title: OpenAITokenLogProb
type: object
OpenAIToolMessageParam:
description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
properties:
role:
const: tool
default: tool
title: Role
type: string
tool_call_id:
title: Tool Call Id
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
required:
- tool_call_id
- content
title: OpenAIToolMessageParam
type: object
OpenAITopLogProb:
description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
required:
- token
- logprob
title: OpenAITopLogProb
type: object
OpenAIUserMessageParam:
description: A message from the user in an OpenAI-compatible chat completion request.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
file: '#/$defs/OpenAIFile'
image_url: '#/$defs/OpenAIChatCompletionContentPartImageParam'
text: '#/$defs/OpenAIChatCompletionContentPartTextParam'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
- $ref: '#/components/schemas/OpenAIFile'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
required:
- content
title: OpenAIUserMessageParam
type: object
description: Response from an OpenAI-compatible chat completion request.
properties:
id:
title: Id
type: string
choices:
items:
$ref: '#/components/schemas/OpenAIChoice'
title: Choices
type: array
object:
const: chat.completion
default: chat.completion
title: Object
type: string
created:
title: Created
type: integer
model:
title: Model
type: string
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsage'
- type: 'null'
required:
- id
- choices
- created
- model
title: OpenAIChatCompletion
type: object
OpenAIChatCompletionChunk:
$defs:
OpenAIChatCompletionToolCall:
description: Tool call specification for OpenAI-compatible chat completion responses.
properties:
index:
anyOf:
- type: integer
- type: 'null'
title: Index
id:
anyOf:
- type: string
- type: 'null'
title: Id
type:
const: function
default: function
title: Type
type: string
function:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction'
- type: 'null'
title: OpenAIChatCompletionToolCall
type: object
OpenAIChatCompletionToolCallFunction:
description: Function call details for OpenAI-compatible tool calls.
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
title: OpenAIChatCompletionToolCallFunction
type: object
OpenAIChatCompletionUsage:
description: Usage information for OpenAI chat completion.
properties:
prompt_tokens:
title: Prompt Tokens
type: integer
completion_tokens:
title: Completion Tokens
type: integer
total_tokens:
title: Total Tokens
type: integer
prompt_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails'
- type: 'null'
completion_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails'
- type: 'null'
required:
- prompt_tokens
- completion_tokens
- total_tokens
title: OpenAIChatCompletionUsage
type: object
OpenAIChatCompletionUsageCompletionTokensDetails:
description: Token details for output tokens in OpenAI chat completion usage.
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
title: Reasoning Tokens
title: OpenAIChatCompletionUsageCompletionTokensDetails
type: object
OpenAIChatCompletionUsagePromptTokensDetails:
description: Token details for prompt tokens in OpenAI chat completion usage.
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
title: Cached Tokens
title: OpenAIChatCompletionUsagePromptTokensDetails
type: object
OpenAIChoiceDelta:
description: A delta from an OpenAI-compatible chat completion streaming response.
properties:
content:
anyOf:
- type: string
- type: 'null'
title: Content
refusal:
anyOf:
- type: string
- type: 'null'
title: Refusal
role:
anyOf:
- type: string
- type: 'null'
title: Role
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
reasoning_content:
anyOf:
- type: string
- type: 'null'
title: Reasoning Content
title: OpenAIChoiceDelta
type: object
OpenAIChoiceLogprobs:
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
title: OpenAIChoiceLogprobs
type: object
OpenAIChunkChoice:
description: A chunk choice from an OpenAI-compatible chat completion streaming response.
properties:
delta:
$ref: '#/components/schemas/OpenAIChoiceDelta'
finish_reason:
title: Finish Reason
type: string
index:
title: Index
type: integer
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs'
- type: 'null'
required:
- delta
- finish_reason
- index
title: OpenAIChunkChoice
type: object
OpenAITokenLogProb:
description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
top_logprobs:
items:
$ref: '#/components/schemas/OpenAITopLogProb'
title: Top Logprobs
type: array
required:
- token
- logprob
- top_logprobs
title: OpenAITokenLogProb
type: object
OpenAITopLogProb:
description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
required:
- token
- logprob
title: OpenAITopLogProb
type: object
description: Chunk from a streaming response to an OpenAI-compatible chat completion request.
properties:
id:
title: Id
type: string
choices:
items:
$ref: '#/components/schemas/OpenAIChunkChoice'
title: Choices
type: array
object:
const: chat.completion.chunk
default: chat.completion.chunk
title: Object
type: string
created:
title: Created
type: integer
model:
title: Model
type: string
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionUsage'
- type: 'null'
required:
- id
- choices
- created
- model
title: OpenAIChatCompletionChunk
type: object
OpenAIChoice:
$defs:
OpenAIAssistantMessageParam:
description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
properties:
role:
const: assistant
default: assistant
title: Role
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
- type: 'null'
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
title: OpenAIAssistantMessageParam
type: object
OpenAIChatCompletionContentPartImageParam:
description: Image content part for OpenAI-compatible chat completion messages.
properties:
type:
const: image_url
default: image_url
title: Type
type: string
image_url:
$ref: '#/components/schemas/OpenAIImageURL'
required:
- image_url
title: OpenAIChatCompletionContentPartImageParam
type: object
OpenAIChatCompletionContentPartTextParam:
description: Text content part for OpenAI-compatible chat completion messages.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: OpenAIChatCompletionContentPartTextParam
type: object
OpenAIChatCompletionToolCall:
description: Tool call specification for OpenAI-compatible chat completion responses.
properties:
index:
anyOf:
- type: integer
- type: 'null'
title: Index
id:
anyOf:
- type: string
- type: 'null'
title: Id
type:
const: function
default: function
title: Type
type: string
function:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction'
- type: 'null'
title: OpenAIChatCompletionToolCall
type: object
OpenAIChatCompletionToolCallFunction:
description: Function call details for OpenAI-compatible tool calls.
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
title: OpenAIChatCompletionToolCallFunction
type: object
OpenAIChoiceLogprobs:
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
title: OpenAIChoiceLogprobs
type: object
OpenAIDeveloperMessageParam:
description: A message from the developer in an OpenAI-compatible chat completion request.
properties:
role:
const: developer
default: developer
title: Role
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
required:
- content
title: OpenAIDeveloperMessageParam
type: object
OpenAIFile:
properties:
type:
const: file
default: file
title: Type
type: string
file:
$ref: '#/components/schemas/OpenAIFileFile'
required:
- file
title: OpenAIFile
type: object
OpenAIFileFile:
properties:
file_id:
anyOf:
- type: string
- type: 'null'
title: File Id
filename:
anyOf:
- type: string
- type: 'null'
title: Filename
title: OpenAIFileFile
type: object
OpenAIImageURL:
description: Image URL specification for OpenAI-compatible chat completion messages.
properties:
url:
title: Url
type: string
detail:
anyOf:
- type: string
- type: 'null'
title: Detail
required:
- url
title: OpenAIImageURL
type: object
OpenAISystemMessageParam:
description: A system message providing instructions or context to the model.
properties:
role:
const: system
default: system
title: Role
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
required:
- content
title: OpenAISystemMessageParam
type: object
OpenAITokenLogProb:
description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
top_logprobs:
items:
$ref: '#/components/schemas/OpenAITopLogProb'
title: Top Logprobs
type: array
required:
- token
- logprob
- top_logprobs
title: OpenAITokenLogProb
type: object
OpenAIToolMessageParam:
description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
properties:
role:
const: tool
default: tool
title: Role
type: string
tool_call_id:
title: Tool Call Id
type: string
content:
anyOf:
- type: string
- items:
$ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
type: array
title: Content
required:
- tool_call_id
- content
title: OpenAIToolMessageParam
type: object
OpenAITopLogProb:
description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
required:
- token
- logprob
title: OpenAITopLogProb
type: object
OpenAIUserMessageParam:
description: A message from the user in an OpenAI-compatible chat completion request.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
file: '#/$defs/OpenAIFile'
image_url: '#/$defs/OpenAIChatCompletionContentPartImageParam'
text: '#/$defs/OpenAIChatCompletionContentPartTextParam'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
- $ref: '#/components/schemas/OpenAIFile'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
required:
- content
title: OpenAIUserMessageParam
type: object
description: A choice from an OpenAI-compatible chat completion response.
properties:
message:
discriminator:
mapping:
assistant: '#/$defs/OpenAIAssistantMessageParam'
developer: '#/$defs/OpenAIDeveloperMessageParam'
system: '#/$defs/OpenAISystemMessageParam'
tool: '#/$defs/OpenAIToolMessageParam'
user: '#/$defs/OpenAIUserMessageParam'
propertyName: role
oneOf:
- $ref: '#/components/schemas/OpenAIUserMessageParam'
- $ref: '#/components/schemas/OpenAISystemMessageParam'
- $ref: '#/components/schemas/OpenAIAssistantMessageParam'
- $ref: '#/components/schemas/OpenAIToolMessageParam'
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
title: Message
finish_reason:
title: Finish Reason
type: string
index:
title: Index
type: integer
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs'
- type: 'null'
required:
- message
- finish_reason
- index
title: OpenAIChoice
type: object
OpenAIChoiceDelta:
$defs:
OpenAIChatCompletionToolCall:
description: Tool call specification for OpenAI-compatible chat completion responses.
properties:
index:
anyOf:
- type: integer
- type: 'null'
title: Index
id:
anyOf:
- type: string
- type: 'null'
title: Id
type:
const: function
default: function
title: Type
type: string
function:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction'
- type: 'null'
title: OpenAIChatCompletionToolCall
type: object
OpenAIChatCompletionToolCallFunction:
description: Function call details for OpenAI-compatible tool calls.
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
title: OpenAIChatCompletionToolCallFunction
type: object
description: A delta from an OpenAI-compatible chat completion streaming response.
properties:
content:
anyOf:
- type: string
- type: 'null'
title: Content
refusal:
anyOf:
- type: string
- type: 'null'
title: Refusal
role:
anyOf:
- type: string
- type: 'null'
title: Role
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
reasoning_content:
anyOf:
- type: string
- type: 'null'
title: Reasoning Content
title: OpenAIChoiceDelta
type: object
OpenAIChoiceLogprobs:
$defs:
OpenAITokenLogProb:
description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
top_logprobs:
items:
$ref: '#/components/schemas/OpenAITopLogProb'
title: Top Logprobs
type: array
required:
- token
- logprob
- top_logprobs
title: OpenAITokenLogProb
type: object
OpenAITopLogProb:
description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
required:
- token
- logprob
title: OpenAITopLogProb
type: object
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
title: OpenAIChoiceLogprobs
type: object
OpenAIChunkChoice:
$defs:
OpenAIChatCompletionToolCall:
description: Tool call specification for OpenAI-compatible chat completion responses.
properties:
index:
anyOf:
- type: integer
- type: 'null'
title: Index
id:
anyOf:
- type: string
- type: 'null'
title: Id
type:
const: function
default: function
title: Type
type: string
function:
anyOf:
- $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction'
- type: 'null'
title: OpenAIChatCompletionToolCall
type: object
OpenAIChatCompletionToolCallFunction:
description: Function call details for OpenAI-compatible tool calls.
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
title: OpenAIChatCompletionToolCallFunction
type: object
OpenAIChoiceDelta:
description: A delta from an OpenAI-compatible chat completion streaming response.
properties:
content:
anyOf:
- type: string
- type: 'null'
title: Content
refusal:
anyOf:
- type: string
- type: 'null'
title: Refusal
role:
anyOf:
- type: string
- type: 'null'
title: Role
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIChatCompletionToolCall'
type: array
- type: 'null'
title: Tool Calls
reasoning_content:
anyOf:
- type: string
- type: 'null'
title: Reasoning Content
title: OpenAIChoiceDelta
type: object
OpenAIChoiceLogprobs:
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
title: OpenAIChoiceLogprobs
type: object
OpenAITokenLogProb:
description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
top_logprobs:
items:
$ref: '#/components/schemas/OpenAITopLogProb'
title: Top Logprobs
type: array
required:
- token
- logprob
- top_logprobs
title: OpenAITokenLogProb
type: object
OpenAITopLogProb:
description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
required:
- token
- logprob
title: OpenAITopLogProb
type: object
description: A chunk choice from an OpenAI-compatible chat completion streaming response.
properties:
delta:
$ref: '#/components/schemas/OpenAIChoiceDelta'
finish_reason:
title: Finish Reason
type: string
index:
title: Index
type: integer
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs'
- type: 'null'
required:
- delta
- finish_reason
- index
title: OpenAIChunkChoice
type: object
OpenAICompletionChoice:
$defs:
OpenAIChoiceLogprobs:
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/OpenAITokenLogProb'
type: array
- type: 'null'
title: Refusal
title: OpenAIChoiceLogprobs
type: object
OpenAITokenLogProb:
description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
top_logprobs:
items:
$ref: '#/components/schemas/OpenAITopLogProb'
title: Top Logprobs
type: array
required:
- token
- logprob
- top_logprobs
title: OpenAITokenLogProb
type: object
OpenAITopLogProb:
description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token"
properties:
token:
title: Token
type: string
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
logprob:
title: Logprob
type: number
required:
- token
- logprob
title: OpenAITopLogProb
type: object
description: "A choice from an OpenAI-compatible completion response.\n\n:finish_reason: The reason the model stopped generating\n:text: The text of the choice\n:index: The index of the choice\n:logprobs: (Optional) The log probabilities for the tokens in the choice"
properties:
finish_reason:
title: Finish Reason
type: string
text:
title: Text
type: string
index:
title: Index
type: integer
logprobs:
anyOf:
- $ref: '#/components/schemas/OpenAIChoiceLogprobs'
- type: 'null'
required:
- finish_reason
- text
- index
title: OpenAICompletionChoice
type: object
OpenAICompletionLogprobs:
description: "The log probabilities for the tokens in the message from an OpenAI-compatible completion response.\n\n:text_offset: (Optional) The offset of the token in the text\n:token_logprobs: (Optional) The log probabilities for the tokens\n:tokens: (Optional) The tokens\n:top_logprobs: (Optional) The top log probabilities for the tokens"
properties:
text_offset:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Text Offset
token_logprobs:
anyOf:
- items:
type: number
type: array
- type: 'null'
title: Token Logprobs
tokens:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Tokens
top_logprobs:
anyOf:
- items:
additionalProperties:
type: number
type: object
type: array
- type: 'null'
title: Top Logprobs
title: OpenAICompletionLogprobs
type: object
OpenAIUserMessageParam:
$defs:
OpenAIChatCompletionContentPartImageParam:
description: Image content part for OpenAI-compatible chat completion messages.
properties:
type:
const: image_url
default: image_url
title: Type
type: string
image_url:
$ref: '#/components/schemas/OpenAIImageURL'
required:
- image_url
title: OpenAIChatCompletionContentPartImageParam
type: object
OpenAIChatCompletionContentPartTextParam:
description: Text content part for OpenAI-compatible chat completion messages.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: OpenAIChatCompletionContentPartTextParam
type: object
OpenAIFile:
properties:
type:
const: file
default: file
title: Type
type: string
file:
$ref: '#/components/schemas/OpenAIFileFile'
required:
- file
title: OpenAIFile
type: object
OpenAIFileFile:
properties:
file_id:
anyOf:
- type: string
- type: 'null'
title: File Id
filename:
anyOf:
- type: string
- type: 'null'
title: Filename
title: OpenAIFileFile
type: object
OpenAIImageURL:
description: Image URL specification for OpenAI-compatible chat completion messages.
properties:
url:
title: Url
type: string
detail:
anyOf:
- type: string
- type: 'null'
title: Detail
required:
- url
title: OpenAIImageURL
type: object
description: A message from the user in an OpenAI-compatible chat completion request.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
file: '#/$defs/OpenAIFile'
image_url: '#/$defs/OpenAIChatCompletionContentPartImageParam'
text: '#/$defs/OpenAIChatCompletionContentPartTextParam'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam'
- $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam'
- $ref: '#/components/schemas/OpenAIFile'
type: array
title: Content
name:
anyOf:
- type: string
- type: 'null'
title: Name
required:
- content
title: OpenAIUserMessageParam
type: object
TokenLogProbs:
description: Log probabilities for generated tokens.
properties:
logprobs_by_token:
additionalProperties:
type: number
title: Logprobs By Token
type: object
required:
- logprobs_by_token
title: TokenLogProbs
type: object
ToolResponse:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: Response from a tool invocation.
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
required:
- call_id
- tool_name
- content
title: ToolResponse
type: object
ToolResponseMessage:
$defs:
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: A message representing the result of a tool invocation.
properties:
role:
const: tool
default: tool
title: Role
type: string
call_id:
title: Call Id
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
required:
- call_id
- content
title: ToolResponseMessage
type: object
UserMessage:
$defs:
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: A message from the user in a chat conversation.
properties:
role:
const: user
default: user
title: Role
type: string
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
context:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
- type: 'null'
title: Context
required:
- content
title: UserMessage
type: object
OpenAIModel:
description: A model from OpenAI.
properties:
id:
description: The ID of the model.
title: Id
type: string
object:
const: model
default: model
description: The object type, which will be 'model'.
title: Object
type: string
created:
description: The Unix timestamp in seconds when the model was created.
title: Created
type: integer
owned_by:
description: The owner of the model.
title: Owned By
type: string
required:
- id
- created
- owned_by
title: OpenAIModel
type: object
PostTrainingJobLogStream:
description: Stream of logs from a finetuning job.
properties:
job_uuid:
title: Job Uuid
type: string
log_lines:
items:
type: string
title: Log Lines
type: array
required:
- job_uuid
- log_lines
title: PostTrainingJobLogStream
type: object
PostTrainingRLHFRequest:
$defs:
DPOAlignmentConfig:
description: Configuration for Direct Preference Optimization (DPO) alignment.
properties:
beta:
title: Beta
type: number
loss_type:
$ref: '#/components/schemas/DPOLossType'
default: sigmoid
required:
- beta
title: DPOAlignmentConfig
type: object
DPOLossType:
enum:
- sigmoid
- hinge
- ipo
- kto_pair
title: DPOLossType
type: string
DataConfig:
description: Configuration for training data and data loading.
properties:
dataset_id:
title: Dataset Id
type: string
batch_size:
title: Batch Size
type: integer
shuffle:
title: Shuffle
type: boolean
data_format:
$ref: '#/components/schemas/DatasetFormat'
validation_dataset_id:
anyOf:
- type: string
- type: 'null'
title: Validation Dataset Id
packed:
anyOf:
- type: boolean
- type: 'null'
default: false
title: Packed
train_on_input:
anyOf:
- type: boolean
- type: 'null'
default: false
title: Train On Input
required:
- dataset_id
- batch_size
- shuffle
- data_format
title: DataConfig
type: object
DatasetFormat:
description: Format of the training dataset.
enum:
- instruct
- dialog
title: DatasetFormat
type: string
EfficiencyConfig:
description: Configuration for memory and compute efficiency optimizations.
properties:
enable_activation_checkpointing:
anyOf:
- type: boolean
- type: 'null'
default: false
title: Enable Activation Checkpointing
enable_activation_offloading:
anyOf:
- type: boolean
- type: 'null'
default: false
title: Enable Activation Offloading
memory_efficient_fsdp_wrap:
anyOf:
- type: boolean
- type: 'null'
default: false
title: Memory Efficient Fsdp Wrap
fsdp_cpu_offload:
anyOf:
- type: boolean
- type: 'null'
default: false
title: Fsdp Cpu Offload
title: EfficiencyConfig
type: object
OptimizerConfig:
description: Configuration parameters for the optimization algorithm.
properties:
optimizer_type:
$ref: '#/components/schemas/OptimizerType'
lr:
title: Lr
type: number
weight_decay:
title: Weight Decay
type: number
num_warmup_steps:
title: Num Warmup Steps
type: integer
required:
- optimizer_type
- lr
- weight_decay
- num_warmup_steps
title: OptimizerConfig
type: object
OptimizerType:
description: Available optimizer algorithms for training.
enum:
- adam
- adamw
- sgd
title: OptimizerType
type: string
RLHFAlgorithm:
description: Available reinforcement learning from human feedback algorithms.
enum:
- dpo
title: RLHFAlgorithm
type: string
TrainingConfig:
description: Comprehensive configuration for the training process.
properties:
n_epochs:
title: N Epochs
type: integer
max_steps_per_epoch:
default: 1
title: Max Steps Per Epoch
type: integer
gradient_accumulation_steps:
default: 1
title: Gradient Accumulation Steps
type: integer
max_validation_steps:
anyOf:
- type: integer
- type: 'null'
default: 1
title: Max Validation Steps
data_config:
anyOf:
- $ref: '#/components/schemas/DataConfig'
- type: 'null'
optimizer_config:
anyOf:
- $ref: '#/components/schemas/OptimizerConfig'
- type: 'null'
efficiency_config:
anyOf:
- $ref: '#/components/schemas/EfficiencyConfig'
- type: 'null'
dtype:
anyOf:
- type: string
- type: 'null'
default: bf16
title: Dtype
required:
- n_epochs
title: TrainingConfig
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
description: Request to finetune a model using reinforcement learning from human feedback.
properties:
job_uuid:
title: Job Uuid
type: string
finetuned_model:
$ref: '#/components/schemas/URL'
dataset_id:
title: Dataset Id
type: string
validation_dataset_id:
title: Validation Dataset Id
type: string
algorithm:
$ref: '#/components/schemas/RLHFAlgorithm'
algorithm_config:
$ref: '#/components/schemas/DPOAlignmentConfig'
optimizer_config:
$ref: '#/components/schemas/OptimizerConfig'
training_config:
$ref: '#/components/schemas/TrainingConfig'
hyperparam_search_config:
additionalProperties: true
title: Hyperparam Search Config
type: object
logger_config:
additionalProperties: true
title: Logger Config
type: object
required:
- job_uuid
- finetuned_model
- dataset_id
- validation_dataset_id
- algorithm
- algorithm_config
- optimizer_config
- training_config
- hyperparam_search_config
- logger_config
title: PostTrainingRLHFRequest
type: object
ToolGroupInput:
$defs:
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
description: Input data for registering a tool group.
properties:
toolgroup_id:
description: Unique identifier for the tool group
title: Toolgroup Id
type: string
provider_id:
description: ID of the provider that will handle this tool group
title: Provider Id
type: string
args:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional arguments to pass to the provider
title: Args
mcp_endpoint:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
description: Model Context Protocol endpoint for remote tools
required:
- toolgroup_id
- provider_id
title: ToolGroupInput
type: object
Chunk:
$defs:
ChunkMetadata:
description: "`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that\n will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata`\n is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after.\n Use `Chunk.metadata` for metadata that will be used in the context during inference."
properties:
chunk_id:
anyOf:
- type: string
- type: 'null'
title: Chunk Id
document_id:
anyOf:
- type: string
- type: 'null'
title: Document Id
source:
anyOf:
- type: string
- type: 'null'
title: Source
created_timestamp:
anyOf:
- type: integer
- type: 'null'
title: Created Timestamp
updated_timestamp:
anyOf:
- type: integer
- type: 'null'
title: Updated Timestamp
chunk_window:
anyOf:
- type: string
- type: 'null'
title: Chunk Window
chunk_tokenizer:
anyOf:
- type: string
- type: 'null'
title: Chunk Tokenizer
chunk_embedding_model:
anyOf:
- type: string
- type: 'null'
title: Chunk Embedding Model
chunk_embedding_dimension:
anyOf:
- type: integer
- type: 'null'
title: Chunk Embedding Dimension
content_token_count:
anyOf:
- type: integer
- type: 'null'
title: Content Token Count
metadata_token_count:
anyOf:
- type: integer
- type: 'null'
title: Metadata Token Count
title: ChunkMetadata
type: object
ImageContentItem:
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
TextContentItem:
description: A text content item.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextContentItem
type: object
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: A chunk of content that can be inserted into a vector database.
properties:
content:
anyOf:
- type: string
- discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
- items:
discriminator:
mapping:
image: '#/$defs/ImageContentItem'
text: '#/$defs/TextContentItem'
propertyName: type
oneOf:
- $ref: '#/components/schemas/ImageContentItem'
- $ref: '#/components/schemas/TextContentItem'
type: array
title: Content
chunk_id:
title: Chunk Id
type: string
metadata:
additionalProperties: true
title: Metadata
type: object
embedding:
anyOf:
- items:
type: number
type: array
- type: 'null'
title: Embedding
chunk_metadata:
anyOf:
- $ref: '#/components/schemas/ChunkMetadata'
- type: 'null'
required:
- content
- chunk_id
title: Chunk
type: object
VectorStoreCreateRequest:
description: Request to create a vector store.
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
file_ids:
items:
type: string
title: File Ids
type: array
expires_after:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Expires After
chunking_strategy:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Chunking Strategy
metadata:
additionalProperties: true
title: Metadata
type: object
title: VectorStoreCreateRequest
type: object
VectorStoreSearchRequest:
description: Request to search a vector store.
properties:
query:
anyOf:
- type: string
- items:
type: string
type: array
title: Query
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Filters
max_num_results:
default: 10
title: Max Num Results
type: integer
ranking_options:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Ranking Options
rewrite_query:
default: false
title: Rewrite Query
type: boolean
required:
- query
title: VectorStoreSearchRequest
type: object
OpenAIResponseContentPartOutputText:
$defs:
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
description: "Text content within a streamed response part.\n\n:param type: Content part type identifier, always \"output_text\"\n:param text: Text emitted for this content part\n:param annotations: Structured annotations associated with the text\n:param logprobs: (Optional) Token log probability details"
properties:
type:
const: output_text
default: output_text
description: Content part type identifier, always "output_text"
title: Type
type: string
text:
description: Text emitted for this content part
title: Text
type: string
annotations:
description: Structured annotations associated with the text
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
logprobs:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
description: Token log probability details
title: Logprobs
required:
- text
title: OpenAIResponseContentPartOutputText
type: object
OpenAIResponseContentPartReasoningSummary:
description: "Reasoning summary part in a streamed response.\n\n:param type: Content part type identifier, always \"summary_text\"\n:param text: Summary text"
properties:
type:
const: summary_text
default: summary_text
description: Content part type identifier, always "summary_text"
title: Type
type: string
text:
description: Summary text
title: Text
type: string
required:
- text
title: OpenAIResponseContentPartReasoningSummary
type: object
OpenAIResponseContentPartReasoningText:
description: "Reasoning text emitted as part of a streamed response.\n\n:param type: Content part type identifier, always \"reasoning_text\"\n:param text: Reasoning text supplied by the model"
properties:
type:
const: reasoning_text
default: reasoning_text
description: Content part type identifier, always "reasoning_text"
title: Type
type: string
text:
description: Reasoning text supplied by the model
title: Text
type: string
required:
- text
title: OpenAIResponseContentPartReasoningText
type: object
OpenAIResponseMessage:
$defs:
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseObjectStreamResponseCompleted:
$defs:
AllowedToolsFilter:
description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed"
properties:
tool_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
description: List of specific tool names that are allowed
title: Tool Names
title: AllowedToolsFilter
type: object
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseError:
description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure"
properties:
code:
description: Error code identifying the type of failure
title: Code
type: string
message:
description: Human-readable error message describing the failure
title: Message
type: string
required:
- code
- message
title: OpenAIResponseError
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseInputToolFileSearch:
description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results"
properties:
type:
const: file_search
default: file_search
description: Tool type identifier, always "file_search"
title: Type
type: string
vector_store_ids:
description: List of vector store identifiers to search within
items:
type: string
title: Vector Store Ids
type: array
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional filters to apply to the search
title: Filters
max_num_results:
anyOf:
- maximum: 50
minimum: 1
type: integer
- type: 'null'
default: 10
description: Maximum number of search results to return (1-50)
title: Max Num Results
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Options for ranking and scoring search results
required:
- vector_store_ids
title: OpenAIResponseInputToolFileSearch
type: object
OpenAIResponseInputToolFunction:
description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation"
properties:
type:
const: function
default: function
description: Tool type identifier, always "function"
title: Type
type: string
name:
description: Name of the function that can be called
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the function does
title: Description
parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON schema defining the function's parameters
title: Parameters
strict:
anyOf:
- type: boolean
- type: 'null'
description: Whether to enforce strict parameter validation
title: Strict
required:
- name
title: OpenAIResponseInputToolFunction
type: object
OpenAIResponseInputToolWebSearch:
description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\""
properties:
type:
anyOf:
- const: web_search
type: string
- const: web_search_preview
type: string
- const: web_search_preview_2025_03_11
type: string
default: web_search
description: Web search tool type variant to use
title: Type
search_context_size:
anyOf:
- pattern: ^low|medium|high$
type: string
- type: 'null'
default: medium
description: Size of search context, must be "low", "medium", or "high"
title: Search Context Size
title: OpenAIResponseInputToolWebSearch
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseObject:
description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context"
properties:
created_at:
description: Unix timestamp when the response was created
title: Created At
type: integer
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
description: Unique identifier for this response
title: Id
type: string
model:
description: Model identifier used for generation
title: Model
type: string
object:
const: response
default: response
description: Object type identifier, always "response"
title: Object
type: string
output:
description: List of generated output items (messages, tool calls, etc.)
items:
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Output
type: array
parallel_tool_calls:
default: false
description: Whether tool calls can be executed in parallel
title: Parallel Tool Calls
type: boolean
previous_response_id:
anyOf:
- type: string
- type: 'null'
description: ID of the previous response in a conversation
title: Previous Response Id
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
description: Current status of the response generation
title: Status
type: string
temperature:
anyOf:
- type: number
- type: 'null'
description: Sampling temperature used for generation
title: Temperature
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
description: Nucleus sampling parameter used for generation
title: Top P
tools:
anyOf:
- items:
discriminator:
mapping:
file_search: '#/$defs/OpenAIResponseInputToolFileSearch'
function: '#/$defs/OpenAIResponseInputToolFunction'
mcp: '#/$defs/OpenAIResponseToolMCP'
web_search: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
type: array
- type: 'null'
description: An array of tools the model may call while generating a response.
title: Tools
truncation:
anyOf:
- type: string
- type: 'null'
description: Truncation strategy applied to the response
title: Truncation
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
description: System message inserted into the model's context
title: Instructions
required:
- created_at
- id
- model
- output
- status
title: OpenAIResponseObject
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
OpenAIResponsePrompt:
description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)"
properties:
id:
description: Unique identifier of the prompt template
title: Id
type: string
variables:
anyOf:
- additionalProperties:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: object
- type: 'null'
description: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files.
title: Variables
version:
anyOf:
- type: string
- type: 'null'
description: Version number of the prompt to use (defaults to latest if not specified)
title: Version
required:
- id
title: OpenAIResponsePrompt
type: object
OpenAIResponseText:
description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements"
properties:
format:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseTextFormat'
- type: 'null'
description: Text format configuration specifying output format requirements
title: OpenAIResponseText
type: object
OpenAIResponseTextFormat:
description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema."
properties:
type:
anyOf:
- const: text
type: string
- const: json_schema
type: string
- const: json_object
type: string
title: Type
name:
anyOf:
- type: string
- type: 'null'
title: Name
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
title: OpenAIResponseTextFormat
type: object
OpenAIResponseToolMCP:
description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
properties:
type:
const: mcp
default: mcp
description: Tool type identifier, always "mcp"
title: Type
type: string
server_label:
description: Label to identify this MCP server
title: Server Label
type: string
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
description: Restriction on which tools can be used from this server
title: Allowed Tools
required:
- server_label
title: OpenAIResponseToolMCP
type: object
OpenAIResponseUsage:
description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage"
properties:
input_tokens:
description: Number of tokens in the input
title: Input Tokens
type: integer
output_tokens:
description: Number of tokens in the output
title: Output Tokens
type: integer
total_tokens:
description: Total tokens used (input + output)
title: Total Tokens
type: integer
input_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails'
- type: 'null'
description: Detailed breakdown of input token usage
output_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails'
- type: 'null'
description: Detailed breakdown of output token usage
required:
- input_tokens
- output_tokens
- total_tokens
title: OpenAIResponseUsage
type: object
OpenAIResponseUsageInputTokensDetails:
description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache"
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens retrieved from cache
title: Cached Tokens
title: OpenAIResponseUsageInputTokensDetails
type: object
OpenAIResponseUsageOutputTokensDetails:
description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)"
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens used for reasoning (o1/o3 models)
title: Reasoning Tokens
title: OpenAIResponseUsageOutputTokensDetails
type: object
SearchRankingOptions:
description: Options for ranking and filtering search results.
properties:
ranker:
anyOf:
- type: string
- type: 'null'
title: Ranker
score_threshold:
anyOf:
- type: number
- type: 'null'
default: 0.0
title: Score Threshold
title: SearchRankingOptions
type: object
description: "Streaming event indicating a response has been completed.\n\n:param response: Completed response object\n:param type: Event type identifier, always \"response.completed\""
properties:
response:
$ref: '#/components/schemas/OpenAIResponseObject'
description: Completed response object
type:
const: response.completed
default: response.completed
description: Event type identifier, always "response.completed"
title: Type
type: string
required:
- response
title: OpenAIResponseObjectStreamResponseCompleted
type: object
OpenAIResponseObjectStreamResponseContentPartAdded:
$defs:
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartOutputText:
description: "Text content within a streamed response part.\n\n:param type: Content part type identifier, always \"output_text\"\n:param text: Text emitted for this content part\n:param annotations: Structured annotations associated with the text\n:param logprobs: (Optional) Token log probability details"
properties:
type:
const: output_text
default: output_text
description: Content part type identifier, always "output_text"
title: Type
type: string
text:
description: Text emitted for this content part
title: Text
type: string
annotations:
description: Structured annotations associated with the text
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
logprobs:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
description: Token log probability details
title: Logprobs
required:
- text
title: OpenAIResponseContentPartOutputText
type: object
OpenAIResponseContentPartReasoningText:
description: "Reasoning text emitted as part of a streamed response.\n\n:param type: Content part type identifier, always \"reasoning_text\"\n:param text: Reasoning text supplied by the model"
properties:
type:
const: reasoning_text
default: reasoning_text
description: Content part type identifier, always "reasoning_text"
title: Type
type: string
text:
description: Reasoning text supplied by the model
title: Text
type: string
required:
- text
title: OpenAIResponseContentPartReasoningText
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
description: "Streaming event for when a new content part is added to a response item.\n\n:param content_index: Index position of the part within the content array\n:param response_id: Unique identifier of the response containing this content\n:param item_id: Unique identifier of the output item containing this content part\n:param output_index: Index position of the output item in the response\n:param part: The content part that was added\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.content_part.added\""
properties:
content_index:
description: Index position of the part within the content array
title: Content Index
type: integer
response_id:
description: Unique identifier of the response containing this content
title: Response Id
type: string
item_id:
description: Unique identifier of the output item containing this content part
title: Item Id
type: string
output_index:
description: Index position of the output item in the response
title: Output Index
type: integer
part:
description: The content part that was added
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseContentPartOutputText'
reasoning_text: '#/$defs/OpenAIResponseContentPartReasoningText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseContentPartOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
- $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText'
title: Part
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.content_part.added
default: response.content_part.added
description: Event type identifier, always "response.content_part.added"
title: Type
type: string
required:
- content_index
- response_id
- item_id
- output_index
- part
- sequence_number
title: OpenAIResponseObjectStreamResponseContentPartAdded
type: object
OpenAIResponseObjectStreamResponseContentPartDone:
$defs:
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartOutputText:
description: "Text content within a streamed response part.\n\n:param type: Content part type identifier, always \"output_text\"\n:param text: Text emitted for this content part\n:param annotations: Structured annotations associated with the text\n:param logprobs: (Optional) Token log probability details"
properties:
type:
const: output_text
default: output_text
description: Content part type identifier, always "output_text"
title: Type
type: string
text:
description: Text emitted for this content part
title: Text
type: string
annotations:
description: Structured annotations associated with the text
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
logprobs:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
description: Token log probability details
title: Logprobs
required:
- text
title: OpenAIResponseContentPartOutputText
type: object
OpenAIResponseContentPartReasoningText:
description: "Reasoning text emitted as part of a streamed response.\n\n:param type: Content part type identifier, always \"reasoning_text\"\n:param text: Reasoning text supplied by the model"
properties:
type:
const: reasoning_text
default: reasoning_text
description: Content part type identifier, always "reasoning_text"
title: Type
type: string
text:
description: Reasoning text supplied by the model
title: Text
type: string
required:
- text
title: OpenAIResponseContentPartReasoningText
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
description: "Streaming event for when a content part is completed.\n\n:param content_index: Index position of the part within the content array\n:param response_id: Unique identifier of the response containing this content\n:param item_id: Unique identifier of the output item containing this content part\n:param output_index: Index position of the output item in the response\n:param part: The completed content part\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.content_part.done\""
properties:
content_index:
description: Index position of the part within the content array
title: Content Index
type: integer
response_id:
description: Unique identifier of the response containing this content
title: Response Id
type: string
item_id:
description: Unique identifier of the output item containing this content part
title: Item Id
type: string
output_index:
description: Index position of the output item in the response
title: Output Index
type: integer
part:
description: The completed content part
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseContentPartOutputText'
reasoning_text: '#/$defs/OpenAIResponseContentPartReasoningText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseContentPartOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
- $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText'
title: Part
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.content_part.done
default: response.content_part.done
description: Event type identifier, always "response.content_part.done"
title: Type
type: string
required:
- content_index
- response_id
- item_id
- output_index
- part
- sequence_number
title: OpenAIResponseObjectStreamResponseContentPartDone
type: object
OpenAIResponseObjectStreamResponseCreated:
$defs:
AllowedToolsFilter:
description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed"
properties:
tool_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
description: List of specific tool names that are allowed
title: Tool Names
title: AllowedToolsFilter
type: object
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseError:
description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure"
properties:
code:
description: Error code identifying the type of failure
title: Code
type: string
message:
description: Human-readable error message describing the failure
title: Message
type: string
required:
- code
- message
title: OpenAIResponseError
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseInputToolFileSearch:
description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results"
properties:
type:
const: file_search
default: file_search
description: Tool type identifier, always "file_search"
title: Type
type: string
vector_store_ids:
description: List of vector store identifiers to search within
items:
type: string
title: Vector Store Ids
type: array
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional filters to apply to the search
title: Filters
max_num_results:
anyOf:
- maximum: 50
minimum: 1
type: integer
- type: 'null'
default: 10
description: Maximum number of search results to return (1-50)
title: Max Num Results
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Options for ranking and scoring search results
required:
- vector_store_ids
title: OpenAIResponseInputToolFileSearch
type: object
OpenAIResponseInputToolFunction:
description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation"
properties:
type:
const: function
default: function
description: Tool type identifier, always "function"
title: Type
type: string
name:
description: Name of the function that can be called
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the function does
title: Description
parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON schema defining the function's parameters
title: Parameters
strict:
anyOf:
- type: boolean
- type: 'null'
description: Whether to enforce strict parameter validation
title: Strict
required:
- name
title: OpenAIResponseInputToolFunction
type: object
OpenAIResponseInputToolWebSearch:
description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\""
properties:
type:
anyOf:
- const: web_search
type: string
- const: web_search_preview
type: string
- const: web_search_preview_2025_03_11
type: string
default: web_search
description: Web search tool type variant to use
title: Type
search_context_size:
anyOf:
- pattern: ^low|medium|high$
type: string
- type: 'null'
default: medium
description: Size of search context, must be "low", "medium", or "high"
title: Search Context Size
title: OpenAIResponseInputToolWebSearch
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseObject:
description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context"
properties:
created_at:
description: Unix timestamp when the response was created
title: Created At
type: integer
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
description: Unique identifier for this response
title: Id
type: string
model:
description: Model identifier used for generation
title: Model
type: string
object:
const: response
default: response
description: Object type identifier, always "response"
title: Object
type: string
output:
description: List of generated output items (messages, tool calls, etc.)
items:
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Output
type: array
parallel_tool_calls:
default: false
description: Whether tool calls can be executed in parallel
title: Parallel Tool Calls
type: boolean
previous_response_id:
anyOf:
- type: string
- type: 'null'
description: ID of the previous response in a conversation
title: Previous Response Id
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
description: Current status of the response generation
title: Status
type: string
temperature:
anyOf:
- type: number
- type: 'null'
description: Sampling temperature used for generation
title: Temperature
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
description: Nucleus sampling parameter used for generation
title: Top P
tools:
anyOf:
- items:
discriminator:
mapping:
file_search: '#/$defs/OpenAIResponseInputToolFileSearch'
function: '#/$defs/OpenAIResponseInputToolFunction'
mcp: '#/$defs/OpenAIResponseToolMCP'
web_search: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
type: array
- type: 'null'
description: An array of tools the model may call while generating a response.
title: Tools
truncation:
anyOf:
- type: string
- type: 'null'
description: Truncation strategy applied to the response
title: Truncation
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
description: System message inserted into the model's context
title: Instructions
required:
- created_at
- id
- model
- output
- status
title: OpenAIResponseObject
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
OpenAIResponsePrompt:
description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)"
properties:
id:
description: Unique identifier of the prompt template
title: Id
type: string
variables:
anyOf:
- additionalProperties:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: object
- type: 'null'
description: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files.
title: Variables
version:
anyOf:
- type: string
- type: 'null'
description: Version number of the prompt to use (defaults to latest if not specified)
title: Version
required:
- id
title: OpenAIResponsePrompt
type: object
OpenAIResponseText:
description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements"
properties:
format:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseTextFormat'
- type: 'null'
description: Text format configuration specifying output format requirements
title: OpenAIResponseText
type: object
OpenAIResponseTextFormat:
description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema."
properties:
type:
anyOf:
- const: text
type: string
- const: json_schema
type: string
- const: json_object
type: string
title: Type
name:
anyOf:
- type: string
- type: 'null'
title: Name
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
title: OpenAIResponseTextFormat
type: object
OpenAIResponseToolMCP:
description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
properties:
type:
const: mcp
default: mcp
description: Tool type identifier, always "mcp"
title: Type
type: string
server_label:
description: Label to identify this MCP server
title: Server Label
type: string
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
description: Restriction on which tools can be used from this server
title: Allowed Tools
required:
- server_label
title: OpenAIResponseToolMCP
type: object
OpenAIResponseUsage:
description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage"
properties:
input_tokens:
description: Number of tokens in the input
title: Input Tokens
type: integer
output_tokens:
description: Number of tokens in the output
title: Output Tokens
type: integer
total_tokens:
description: Total tokens used (input + output)
title: Total Tokens
type: integer
input_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails'
- type: 'null'
description: Detailed breakdown of input token usage
output_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails'
- type: 'null'
description: Detailed breakdown of output token usage
required:
- input_tokens
- output_tokens
- total_tokens
title: OpenAIResponseUsage
type: object
OpenAIResponseUsageInputTokensDetails:
description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache"
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens retrieved from cache
title: Cached Tokens
title: OpenAIResponseUsageInputTokensDetails
type: object
OpenAIResponseUsageOutputTokensDetails:
description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)"
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens used for reasoning (o1/o3 models)
title: Reasoning Tokens
title: OpenAIResponseUsageOutputTokensDetails
type: object
SearchRankingOptions:
description: Options for ranking and filtering search results.
properties:
ranker:
anyOf:
- type: string
- type: 'null'
title: Ranker
score_threshold:
anyOf:
- type: number
- type: 'null'
default: 0.0
title: Score Threshold
title: SearchRankingOptions
type: object
description: "Streaming event indicating a new response has been created.\n\n:param response: The response object that was created\n:param type: Event type identifier, always \"response.created\""
properties:
response:
$ref: '#/components/schemas/OpenAIResponseObject'
description: The response object that was created
type:
const: response.created
default: response.created
description: Event type identifier, always "response.created"
title: Type
type: string
required:
- response
title: OpenAIResponseObjectStreamResponseCreated
type: object
OpenAIResponseObjectStreamResponseFailed:
$defs:
AllowedToolsFilter:
description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed"
properties:
tool_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
description: List of specific tool names that are allowed
title: Tool Names
title: AllowedToolsFilter
type: object
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseError:
description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure"
properties:
code:
description: Error code identifying the type of failure
title: Code
type: string
message:
description: Human-readable error message describing the failure
title: Message
type: string
required:
- code
- message
title: OpenAIResponseError
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseInputToolFileSearch:
description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results"
properties:
type:
const: file_search
default: file_search
description: Tool type identifier, always "file_search"
title: Type
type: string
vector_store_ids:
description: List of vector store identifiers to search within
items:
type: string
title: Vector Store Ids
type: array
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional filters to apply to the search
title: Filters
max_num_results:
anyOf:
- maximum: 50
minimum: 1
type: integer
- type: 'null'
default: 10
description: Maximum number of search results to return (1-50)
title: Max Num Results
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Options for ranking and scoring search results
required:
- vector_store_ids
title: OpenAIResponseInputToolFileSearch
type: object
OpenAIResponseInputToolFunction:
description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation"
properties:
type:
const: function
default: function
description: Tool type identifier, always "function"
title: Type
type: string
name:
description: Name of the function that can be called
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the function does
title: Description
parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON schema defining the function's parameters
title: Parameters
strict:
anyOf:
- type: boolean
- type: 'null'
description: Whether to enforce strict parameter validation
title: Strict
required:
- name
title: OpenAIResponseInputToolFunction
type: object
OpenAIResponseInputToolWebSearch:
description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\""
properties:
type:
anyOf:
- const: web_search
type: string
- const: web_search_preview
type: string
- const: web_search_preview_2025_03_11
type: string
default: web_search
description: Web search tool type variant to use
title: Type
search_context_size:
anyOf:
- pattern: ^low|medium|high$
type: string
- type: 'null'
default: medium
description: Size of search context, must be "low", "medium", or "high"
title: Search Context Size
title: OpenAIResponseInputToolWebSearch
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseObject:
description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context"
properties:
created_at:
description: Unix timestamp when the response was created
title: Created At
type: integer
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
description: Unique identifier for this response
title: Id
type: string
model:
description: Model identifier used for generation
title: Model
type: string
object:
const: response
default: response
description: Object type identifier, always "response"
title: Object
type: string
output:
description: List of generated output items (messages, tool calls, etc.)
items:
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Output
type: array
parallel_tool_calls:
default: false
description: Whether tool calls can be executed in parallel
title: Parallel Tool Calls
type: boolean
previous_response_id:
anyOf:
- type: string
- type: 'null'
description: ID of the previous response in a conversation
title: Previous Response Id
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
description: Current status of the response generation
title: Status
type: string
temperature:
anyOf:
- type: number
- type: 'null'
description: Sampling temperature used for generation
title: Temperature
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
description: Nucleus sampling parameter used for generation
title: Top P
tools:
anyOf:
- items:
discriminator:
mapping:
file_search: '#/$defs/OpenAIResponseInputToolFileSearch'
function: '#/$defs/OpenAIResponseInputToolFunction'
mcp: '#/$defs/OpenAIResponseToolMCP'
web_search: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
type: array
- type: 'null'
description: An array of tools the model may call while generating a response.
title: Tools
truncation:
anyOf:
- type: string
- type: 'null'
description: Truncation strategy applied to the response
title: Truncation
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
description: System message inserted into the model's context
title: Instructions
required:
- created_at
- id
- model
- output
- status
title: OpenAIResponseObject
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
OpenAIResponsePrompt:
description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)"
properties:
id:
description: Unique identifier of the prompt template
title: Id
type: string
variables:
anyOf:
- additionalProperties:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: object
- type: 'null'
description: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files.
title: Variables
version:
anyOf:
- type: string
- type: 'null'
description: Version number of the prompt to use (defaults to latest if not specified)
title: Version
required:
- id
title: OpenAIResponsePrompt
type: object
OpenAIResponseText:
description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements"
properties:
format:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseTextFormat'
- type: 'null'
description: Text format configuration specifying output format requirements
title: OpenAIResponseText
type: object
OpenAIResponseTextFormat:
description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema."
properties:
type:
anyOf:
- const: text
type: string
- const: json_schema
type: string
- const: json_object
type: string
title: Type
name:
anyOf:
- type: string
- type: 'null'
title: Name
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
title: OpenAIResponseTextFormat
type: object
OpenAIResponseToolMCP:
description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
properties:
type:
const: mcp
default: mcp
description: Tool type identifier, always "mcp"
title: Type
type: string
server_label:
description: Label to identify this MCP server
title: Server Label
type: string
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
description: Restriction on which tools can be used from this server
title: Allowed Tools
required:
- server_label
title: OpenAIResponseToolMCP
type: object
OpenAIResponseUsage:
description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage"
properties:
input_tokens:
description: Number of tokens in the input
title: Input Tokens
type: integer
output_tokens:
description: Number of tokens in the output
title: Output Tokens
type: integer
total_tokens:
description: Total tokens used (input + output)
title: Total Tokens
type: integer
input_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails'
- type: 'null'
description: Detailed breakdown of input token usage
output_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails'
- type: 'null'
description: Detailed breakdown of output token usage
required:
- input_tokens
- output_tokens
- total_tokens
title: OpenAIResponseUsage
type: object
OpenAIResponseUsageInputTokensDetails:
description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache"
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens retrieved from cache
title: Cached Tokens
title: OpenAIResponseUsageInputTokensDetails
type: object
OpenAIResponseUsageOutputTokensDetails:
description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)"
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens used for reasoning (o1/o3 models)
title: Reasoning Tokens
title: OpenAIResponseUsageOutputTokensDetails
type: object
SearchRankingOptions:
description: Options for ranking and filtering search results.
properties:
ranker:
anyOf:
- type: string
- type: 'null'
title: Ranker
score_threshold:
anyOf:
- type: number
- type: 'null'
default: 0.0
title: Score Threshold
title: SearchRankingOptions
type: object
description: "Streaming event emitted when a response fails.\n\n:param response: Response object describing the failure\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.failed\""
properties:
response:
$ref: '#/components/schemas/OpenAIResponseObject'
description: Response object describing the failure
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.failed
default: response.failed
description: Event type identifier, always "response.failed"
title: Type
type: string
required:
- response
- sequence_number
title: OpenAIResponseObjectStreamResponseFailed
type: object
OpenAIResponseObjectStreamResponseFileSearchCallCompleted:
description: "Streaming event for completed file search calls.\n\n:param item_id: Unique identifier of the completed file search call\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.file_search_call.completed\""
properties:
item_id:
description: Unique identifier of the completed file search call
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.file_search_call.completed
default: response.file_search_call.completed
description: Event type identifier, always "response.file_search_call.completed"
title: Type
type: string
required:
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted
type: object
OpenAIResponseObjectStreamResponseFileSearchCallInProgress:
description: "Streaming event for file search calls in progress.\n\n:param item_id: Unique identifier of the file search call\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.file_search_call.in_progress\""
properties:
item_id:
description: Unique identifier of the file search call
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.file_search_call.in_progress
default: response.file_search_call.in_progress
description: Event type identifier, always "response.file_search_call.in_progress"
title: Type
type: string
required:
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress
type: object
OpenAIResponseObjectStreamResponseFileSearchCallSearching:
description: "Streaming event for file search currently searching.\n\n:param item_id: Unique identifier of the file search call\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.file_search_call.searching\""
properties:
item_id:
description: Unique identifier of the file search call
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.file_search_call.searching
default: response.file_search_call.searching
description: Event type identifier, always "response.file_search_call.searching"
title: Type
type: string
required:
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseFileSearchCallSearching
type: object
OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta:
description: "Streaming event for incremental function call argument updates.\n\n:param delta: Incremental function call arguments being added\n:param item_id: Unique identifier of the function call being updated\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.function_call_arguments.delta\""
properties:
delta:
description: Incremental function call arguments being added
title: Delta
type: string
item_id:
description: Unique identifier of the function call being updated
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.function_call_arguments.delta
default: response.function_call_arguments.delta
description: Event type identifier, always "response.function_call_arguments.delta"
title: Type
type: string
required:
- delta
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta
type: object
OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone:
description: "Streaming event for when function call arguments are completed.\n\n:param arguments: Final complete arguments JSON string for the function call\n:param item_id: Unique identifier of the completed function call\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.function_call_arguments.done\""
properties:
arguments:
description: Final complete arguments JSON string for the function call
title: Arguments
type: string
item_id:
description: Unique identifier of the completed function call
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.function_call_arguments.done
default: response.function_call_arguments.done
description: Event type identifier, always "response.function_call_arguments.done"
title: Type
type: string
required:
- arguments
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone
type: object
OpenAIResponseObjectStreamResponseInProgress:
$defs:
AllowedToolsFilter:
description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed"
properties:
tool_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
description: List of specific tool names that are allowed
title: Tool Names
title: AllowedToolsFilter
type: object
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseError:
description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure"
properties:
code:
description: Error code identifying the type of failure
title: Code
type: string
message:
description: Human-readable error message describing the failure
title: Message
type: string
required:
- code
- message
title: OpenAIResponseError
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseInputToolFileSearch:
description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results"
properties:
type:
const: file_search
default: file_search
description: Tool type identifier, always "file_search"
title: Type
type: string
vector_store_ids:
description: List of vector store identifiers to search within
items:
type: string
title: Vector Store Ids
type: array
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional filters to apply to the search
title: Filters
max_num_results:
anyOf:
- maximum: 50
minimum: 1
type: integer
- type: 'null'
default: 10
description: Maximum number of search results to return (1-50)
title: Max Num Results
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Options for ranking and scoring search results
required:
- vector_store_ids
title: OpenAIResponseInputToolFileSearch
type: object
OpenAIResponseInputToolFunction:
description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation"
properties:
type:
const: function
default: function
description: Tool type identifier, always "function"
title: Type
type: string
name:
description: Name of the function that can be called
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the function does
title: Description
parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON schema defining the function's parameters
title: Parameters
strict:
anyOf:
- type: boolean
- type: 'null'
description: Whether to enforce strict parameter validation
title: Strict
required:
- name
title: OpenAIResponseInputToolFunction
type: object
OpenAIResponseInputToolWebSearch:
description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\""
properties:
type:
anyOf:
- const: web_search
type: string
- const: web_search_preview
type: string
- const: web_search_preview_2025_03_11
type: string
default: web_search
description: Web search tool type variant to use
title: Type
search_context_size:
anyOf:
- pattern: ^low|medium|high$
type: string
- type: 'null'
default: medium
description: Size of search context, must be "low", "medium", or "high"
title: Search Context Size
title: OpenAIResponseInputToolWebSearch
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseObject:
description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context"
properties:
created_at:
description: Unix timestamp when the response was created
title: Created At
type: integer
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
description: Unique identifier for this response
title: Id
type: string
model:
description: Model identifier used for generation
title: Model
type: string
object:
const: response
default: response
description: Object type identifier, always "response"
title: Object
type: string
output:
description: List of generated output items (messages, tool calls, etc.)
items:
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Output
type: array
parallel_tool_calls:
default: false
description: Whether tool calls can be executed in parallel
title: Parallel Tool Calls
type: boolean
previous_response_id:
anyOf:
- type: string
- type: 'null'
description: ID of the previous response in a conversation
title: Previous Response Id
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
description: Current status of the response generation
title: Status
type: string
temperature:
anyOf:
- type: number
- type: 'null'
description: Sampling temperature used for generation
title: Temperature
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
description: Nucleus sampling parameter used for generation
title: Top P
tools:
anyOf:
- items:
discriminator:
mapping:
file_search: '#/$defs/OpenAIResponseInputToolFileSearch'
function: '#/$defs/OpenAIResponseInputToolFunction'
mcp: '#/$defs/OpenAIResponseToolMCP'
web_search: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
type: array
- type: 'null'
description: An array of tools the model may call while generating a response.
title: Tools
truncation:
anyOf:
- type: string
- type: 'null'
description: Truncation strategy applied to the response
title: Truncation
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
description: System message inserted into the model's context
title: Instructions
required:
- created_at
- id
- model
- output
- status
title: OpenAIResponseObject
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
OpenAIResponsePrompt:
description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)"
properties:
id:
description: Unique identifier of the prompt template
title: Id
type: string
variables:
anyOf:
- additionalProperties:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: object
- type: 'null'
description: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files.
title: Variables
version:
anyOf:
- type: string
- type: 'null'
description: Version number of the prompt to use (defaults to latest if not specified)
title: Version
required:
- id
title: OpenAIResponsePrompt
type: object
OpenAIResponseText:
description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements"
properties:
format:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseTextFormat'
- type: 'null'
description: Text format configuration specifying output format requirements
title: OpenAIResponseText
type: object
OpenAIResponseTextFormat:
description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema."
properties:
type:
anyOf:
- const: text
type: string
- const: json_schema
type: string
- const: json_object
type: string
title: Type
name:
anyOf:
- type: string
- type: 'null'
title: Name
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
title: OpenAIResponseTextFormat
type: object
OpenAIResponseToolMCP:
description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
properties:
type:
const: mcp
default: mcp
description: Tool type identifier, always "mcp"
title: Type
type: string
server_label:
description: Label to identify this MCP server
title: Server Label
type: string
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
description: Restriction on which tools can be used from this server
title: Allowed Tools
required:
- server_label
title: OpenAIResponseToolMCP
type: object
OpenAIResponseUsage:
description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage"
properties:
input_tokens:
description: Number of tokens in the input
title: Input Tokens
type: integer
output_tokens:
description: Number of tokens in the output
title: Output Tokens
type: integer
total_tokens:
description: Total tokens used (input + output)
title: Total Tokens
type: integer
input_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails'
- type: 'null'
description: Detailed breakdown of input token usage
output_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails'
- type: 'null'
description: Detailed breakdown of output token usage
required:
- input_tokens
- output_tokens
- total_tokens
title: OpenAIResponseUsage
type: object
OpenAIResponseUsageInputTokensDetails:
description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache"
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens retrieved from cache
title: Cached Tokens
title: OpenAIResponseUsageInputTokensDetails
type: object
OpenAIResponseUsageOutputTokensDetails:
description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)"
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens used for reasoning (o1/o3 models)
title: Reasoning Tokens
title: OpenAIResponseUsageOutputTokensDetails
type: object
SearchRankingOptions:
description: Options for ranking and filtering search results.
properties:
ranker:
anyOf:
- type: string
- type: 'null'
title: Ranker
score_threshold:
anyOf:
- type: number
- type: 'null'
default: 0.0
title: Score Threshold
title: SearchRankingOptions
type: object
description: "Streaming event indicating the response remains in progress.\n\n:param response: Current response state while in progress\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.in_progress\""
properties:
response:
$ref: '#/components/schemas/OpenAIResponseObject'
description: Current response state while in progress
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.in_progress
default: response.in_progress
description: Event type identifier, always "response.in_progress"
title: Type
type: string
required:
- response
- sequence_number
title: OpenAIResponseObjectStreamResponseInProgress
type: object
OpenAIResponseObjectStreamResponseIncomplete:
$defs:
AllowedToolsFilter:
description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed"
properties:
tool_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
description: List of specific tool names that are allowed
title: Tool Names
title: AllowedToolsFilter
type: object
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseError:
description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure"
properties:
code:
description: Error code identifying the type of failure
title: Code
type: string
message:
description: Human-readable error message describing the failure
title: Message
type: string
required:
- code
- message
title: OpenAIResponseError
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseInputToolFileSearch:
description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results"
properties:
type:
const: file_search
default: file_search
description: Tool type identifier, always "file_search"
title: Type
type: string
vector_store_ids:
description: List of vector store identifiers to search within
items:
type: string
title: Vector Store Ids
type: array
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional filters to apply to the search
title: Filters
max_num_results:
anyOf:
- maximum: 50
minimum: 1
type: integer
- type: 'null'
default: 10
description: Maximum number of search results to return (1-50)
title: Max Num Results
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Options for ranking and scoring search results
required:
- vector_store_ids
title: OpenAIResponseInputToolFileSearch
type: object
OpenAIResponseInputToolFunction:
description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation"
properties:
type:
const: function
default: function
description: Tool type identifier, always "function"
title: Type
type: string
name:
description: Name of the function that can be called
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the function does
title: Description
parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON schema defining the function's parameters
title: Parameters
strict:
anyOf:
- type: boolean
- type: 'null'
description: Whether to enforce strict parameter validation
title: Strict
required:
- name
title: OpenAIResponseInputToolFunction
type: object
OpenAIResponseInputToolWebSearch:
description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\""
properties:
type:
anyOf:
- const: web_search
type: string
- const: web_search_preview
type: string
- const: web_search_preview_2025_03_11
type: string
default: web_search
description: Web search tool type variant to use
title: Type
search_context_size:
anyOf:
- pattern: ^low|medium|high$
type: string
- type: 'null'
default: medium
description: Size of search context, must be "low", "medium", or "high"
title: Search Context Size
title: OpenAIResponseInputToolWebSearch
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseObject:
description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context"
properties:
created_at:
description: Unix timestamp when the response was created
title: Created At
type: integer
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
description: Unique identifier for this response
title: Id
type: string
model:
description: Model identifier used for generation
title: Model
type: string
object:
const: response
default: response
description: Object type identifier, always "response"
title: Object
type: string
output:
description: List of generated output items (messages, tool calls, etc.)
items:
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Output
type: array
parallel_tool_calls:
default: false
description: Whether tool calls can be executed in parallel
title: Parallel Tool Calls
type: boolean
previous_response_id:
anyOf:
- type: string
- type: 'null'
description: ID of the previous response in a conversation
title: Previous Response Id
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
description: Current status of the response generation
title: Status
type: string
temperature:
anyOf:
- type: number
- type: 'null'
description: Sampling temperature used for generation
title: Temperature
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
description: Nucleus sampling parameter used for generation
title: Top P
tools:
anyOf:
- items:
discriminator:
mapping:
file_search: '#/$defs/OpenAIResponseInputToolFileSearch'
function: '#/$defs/OpenAIResponseInputToolFunction'
mcp: '#/$defs/OpenAIResponseToolMCP'
web_search: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
type: array
- type: 'null'
description: An array of tools the model may call while generating a response.
title: Tools
truncation:
anyOf:
- type: string
- type: 'null'
description: Truncation strategy applied to the response
title: Truncation
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
description: System message inserted into the model's context
title: Instructions
required:
- created_at
- id
- model
- output
- status
title: OpenAIResponseObject
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
OpenAIResponsePrompt:
description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)"
properties:
id:
description: Unique identifier of the prompt template
title: Id
type: string
variables:
anyOf:
- additionalProperties:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: object
- type: 'null'
description: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files.
title: Variables
version:
anyOf:
- type: string
- type: 'null'
description: Version number of the prompt to use (defaults to latest if not specified)
title: Version
required:
- id
title: OpenAIResponsePrompt
type: object
OpenAIResponseText:
description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements"
properties:
format:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseTextFormat'
- type: 'null'
description: Text format configuration specifying output format requirements
title: OpenAIResponseText
type: object
OpenAIResponseTextFormat:
description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema."
properties:
type:
anyOf:
- const: text
type: string
- const: json_schema
type: string
- const: json_object
type: string
title: Type
name:
anyOf:
- type: string
- type: 'null'
title: Name
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
title: OpenAIResponseTextFormat
type: object
OpenAIResponseToolMCP:
description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
properties:
type:
const: mcp
default: mcp
description: Tool type identifier, always "mcp"
title: Type
type: string
server_label:
description: Label to identify this MCP server
title: Server Label
type: string
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
description: Restriction on which tools can be used from this server
title: Allowed Tools
required:
- server_label
title: OpenAIResponseToolMCP
type: object
OpenAIResponseUsage:
description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage"
properties:
input_tokens:
description: Number of tokens in the input
title: Input Tokens
type: integer
output_tokens:
description: Number of tokens in the output
title: Output Tokens
type: integer
total_tokens:
description: Total tokens used (input + output)
title: Total Tokens
type: integer
input_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails'
- type: 'null'
description: Detailed breakdown of input token usage
output_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails'
- type: 'null'
description: Detailed breakdown of output token usage
required:
- input_tokens
- output_tokens
- total_tokens
title: OpenAIResponseUsage
type: object
OpenAIResponseUsageInputTokensDetails:
description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache"
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens retrieved from cache
title: Cached Tokens
title: OpenAIResponseUsageInputTokensDetails
type: object
OpenAIResponseUsageOutputTokensDetails:
description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)"
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens used for reasoning (o1/o3 models)
title: Reasoning Tokens
title: OpenAIResponseUsageOutputTokensDetails
type: object
SearchRankingOptions:
description: Options for ranking and filtering search results.
properties:
ranker:
anyOf:
- type: string
- type: 'null'
title: Ranker
score_threshold:
anyOf:
- type: number
- type: 'null'
default: 0.0
title: Score Threshold
title: SearchRankingOptions
type: object
description: "Streaming event emitted when a response ends in an incomplete state.\n\n:param response: Response object describing the incomplete state\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.incomplete\""
properties:
response:
$ref: '#/components/schemas/OpenAIResponseObject'
description: Response object describing the incomplete state
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.incomplete
default: response.incomplete
description: Event type identifier, always "response.incomplete"
title: Type
type: string
required:
- response
- sequence_number
title: OpenAIResponseObjectStreamResponseIncomplete
type: object
OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta:
properties:
delta:
title: Delta
type: string
item_id:
title: Item Id
type: string
output_index:
title: Output Index
type: integer
sequence_number:
title: Sequence Number
type: integer
type:
const: response.mcp_call.arguments.delta
default: response.mcp_call.arguments.delta
title: Type
type: string
required:
- delta
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta
type: object
OpenAIResponseObjectStreamResponseMcpCallArgumentsDone:
properties:
arguments:
title: Arguments
type: string
item_id:
title: Item Id
type: string
output_index:
title: Output Index
type: integer
sequence_number:
title: Sequence Number
type: integer
type:
const: response.mcp_call.arguments.done
default: response.mcp_call.arguments.done
title: Type
type: string
required:
- arguments
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone
type: object
OpenAIResponseObjectStreamResponseMcpCallCompleted:
description: "Streaming event for completed MCP calls.\n\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.mcp_call.completed\""
properties:
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.mcp_call.completed
default: response.mcp_call.completed
description: Event type identifier, always "response.mcp_call.completed"
title: Type
type: string
required:
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpCallCompleted
type: object
OpenAIResponseObjectStreamResponseMcpCallFailed:
description: "Streaming event for failed MCP calls.\n\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.mcp_call.failed\""
properties:
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.mcp_call.failed
default: response.mcp_call.failed
description: Event type identifier, always "response.mcp_call.failed"
title: Type
type: string
required:
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpCallFailed
type: object
OpenAIResponseObjectStreamResponseMcpCallInProgress:
description: "Streaming event for MCP calls in progress.\n\n:param item_id: Unique identifier of the MCP call\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.mcp_call.in_progress\""
properties:
item_id:
description: Unique identifier of the MCP call
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.mcp_call.in_progress
default: response.mcp_call.in_progress
description: Event type identifier, always "response.mcp_call.in_progress"
title: Type
type: string
required:
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpCallInProgress
type: object
OpenAIResponseObjectStreamResponseMcpListToolsCompleted:
properties:
sequence_number:
title: Sequence Number
type: integer
type:
const: response.mcp_list_tools.completed
default: response.mcp_list_tools.completed
title: Type
type: string
required:
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted
type: object
OpenAIResponseObjectStreamResponseMcpListToolsFailed:
properties:
sequence_number:
title: Sequence Number
type: integer
type:
const: response.mcp_list_tools.failed
default: response.mcp_list_tools.failed
title: Type
type: string
required:
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpListToolsFailed
type: object
OpenAIResponseObjectStreamResponseMcpListToolsInProgress:
properties:
sequence_number:
title: Sequence Number
type: integer
type:
const: response.mcp_list_tools.in_progress
default: response.mcp_list_tools.in_progress
title: Type
type: string
required:
- sequence_number
title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress
type: object
OpenAIResponseObjectStreamResponseOutputItemAdded:
$defs:
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
description: "Streaming event for when a new output item is added to the response.\n\n:param response_id: Unique identifier of the response containing this output\n:param item: The output item that was added (message, tool call, etc.)\n:param output_index: Index position of this item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.output_item.added\""
properties:
response_id:
description: Unique identifier of the response containing this output
title: Response Id
type: string
item:
description: The output item that was added (message, tool call, etc.)
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Item
output_index:
description: Index position of this item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.output_item.added
default: response.output_item.added
description: Event type identifier, always "response.output_item.added"
title: Type
type: string
required:
- response_id
- item
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseOutputItemAdded
type: object
OpenAIResponseObjectStreamResponseOutputItemDone:
$defs:
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
description: "Streaming event for when an output item is completed.\n\n:param response_id: Unique identifier of the response containing this output\n:param item: The completed output item (message, tool call, etc.)\n:param output_index: Index position of this item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.output_item.done\""
properties:
response_id:
description: Unique identifier of the response containing this output
title: Response Id
type: string
item:
description: The completed output item (message, tool call, etc.)
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Item
output_index:
description: Index position of this item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.output_item.done
default: response.output_item.done
description: Event type identifier, always "response.output_item.done"
title: Type
type: string
required:
- response_id
- item
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseOutputItemDone
type: object
OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded:
$defs:
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
description: "Streaming event for when an annotation is added to output text.\n\n:param item_id: Unique identifier of the item to which the annotation is being added\n:param output_index: Index position of the output item in the response's output array\n:param content_index: Index position of the content part within the output item\n:param annotation_index: Index of the annotation within the content part\n:param annotation: The annotation object being added\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.output_text.annotation.added\""
properties:
item_id:
description: Unique identifier of the item to which the annotation is being added
title: Item Id
type: string
output_index:
description: Index position of the output item in the response's output array
title: Output Index
type: integer
content_index:
description: Index position of the content part within the output item
title: Content Index
type: integer
annotation_index:
description: Index of the annotation within the content part
title: Annotation Index
type: integer
annotation:
description: The annotation object being added
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotation
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.output_text.annotation.added
default: response.output_text.annotation.added
description: Event type identifier, always "response.output_text.annotation.added"
title: Type
type: string
required:
- item_id
- output_index
- content_index
- annotation_index
- annotation
- sequence_number
title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded
type: object
OpenAIResponseObjectStreamResponseOutputTextDelta:
description: "Streaming event for incremental text content updates.\n\n:param content_index: Index position within the text content\n:param delta: Incremental text content being added\n:param item_id: Unique identifier of the output item being updated\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.output_text.delta\""
properties:
content_index:
description: Index position within the text content
title: Content Index
type: integer
delta:
description: Incremental text content being added
title: Delta
type: string
item_id:
description: Unique identifier of the output item being updated
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.output_text.delta
default: response.output_text.delta
description: Event type identifier, always "response.output_text.delta"
title: Type
type: string
required:
- content_index
- delta
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseOutputTextDelta
type: object
OpenAIResponseObjectStreamResponseOutputTextDone:
description: "Streaming event for when text output is completed.\n\n:param content_index: Index position within the text content\n:param text: Final complete text content of the output item\n:param item_id: Unique identifier of the completed output item\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.output_text.done\""
properties:
content_index:
description: Index position within the text content
title: Content Index
type: integer
text:
description: Final complete text content of the output item
title: Text
type: string
item_id:
description: Unique identifier of the completed output item
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.output_text.done
default: response.output_text.done
description: Event type identifier, always "response.output_text.done"
title: Type
type: string
required:
- content_index
- text
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseOutputTextDone
type: object
OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded:
$defs:
OpenAIResponseContentPartReasoningSummary:
description: "Reasoning summary part in a streamed response.\n\n:param type: Content part type identifier, always \"summary_text\"\n:param text: Summary text"
properties:
type:
const: summary_text
default: summary_text
description: Content part type identifier, always "summary_text"
title: Type
type: string
text:
description: Summary text
title: Text
type: string
required:
- text
title: OpenAIResponseContentPartReasoningSummary
type: object
description: "Streaming event for when a new reasoning summary part is added.\n\n:param item_id: Unique identifier of the output item\n:param output_index: Index position of the output item\n:param part: The summary part that was added\n:param sequence_number: Sequential number for ordering streaming events\n:param summary_index: Index of the summary part within the reasoning summary\n:param type: Event type identifier, always \"response.reasoning_summary_part.added\""
properties:
item_id:
description: Unique identifier of the output item
title: Item Id
type: string
output_index:
description: Index position of the output item
title: Output Index
type: integer
part:
$ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary'
description: The summary part that was added
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
summary_index:
description: Index of the summary part within the reasoning summary
title: Summary Index
type: integer
type:
const: response.reasoning_summary_part.added
default: response.reasoning_summary_part.added
description: Event type identifier, always "response.reasoning_summary_part.added"
title: Type
type: string
required:
- item_id
- output_index
- part
- sequence_number
- summary_index
title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded
type: object
OpenAIResponseObjectStreamResponseReasoningSummaryPartDone:
$defs:
OpenAIResponseContentPartReasoningSummary:
description: "Reasoning summary part in a streamed response.\n\n:param type: Content part type identifier, always \"summary_text\"\n:param text: Summary text"
properties:
type:
const: summary_text
default: summary_text
description: Content part type identifier, always "summary_text"
title: Type
type: string
text:
description: Summary text
title: Text
type: string
required:
- text
title: OpenAIResponseContentPartReasoningSummary
type: object
description: "Streaming event for when a reasoning summary part is completed.\n\n:param item_id: Unique identifier of the output item\n:param output_index: Index position of the output item\n:param part: The completed summary part\n:param sequence_number: Sequential number for ordering streaming events\n:param summary_index: Index of the summary part within the reasoning summary\n:param type: Event type identifier, always \"response.reasoning_summary_part.done\""
properties:
item_id:
description: Unique identifier of the output item
title: Item Id
type: string
output_index:
description: Index position of the output item
title: Output Index
type: integer
part:
$ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary'
description: The completed summary part
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
summary_index:
description: Index of the summary part within the reasoning summary
title: Summary Index
type: integer
type:
const: response.reasoning_summary_part.done
default: response.reasoning_summary_part.done
description: Event type identifier, always "response.reasoning_summary_part.done"
title: Type
type: string
required:
- item_id
- output_index
- part
- sequence_number
- summary_index
title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone
type: object
OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta:
description: "Streaming event for incremental reasoning summary text updates.\n\n:param delta: Incremental summary text being added\n:param item_id: Unique identifier of the output item\n:param output_index: Index position of the output item\n:param sequence_number: Sequential number for ordering streaming events\n:param summary_index: Index of the summary part within the reasoning summary\n:param type: Event type identifier, always \"response.reasoning_summary_text.delta\""
properties:
delta:
description: Incremental summary text being added
title: Delta
type: string
item_id:
description: Unique identifier of the output item
title: Item Id
type: string
output_index:
description: Index position of the output item
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
summary_index:
description: Index of the summary part within the reasoning summary
title: Summary Index
type: integer
type:
const: response.reasoning_summary_text.delta
default: response.reasoning_summary_text.delta
description: Event type identifier, always "response.reasoning_summary_text.delta"
title: Type
type: string
required:
- delta
- item_id
- output_index
- sequence_number
- summary_index
title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta
type: object
OpenAIResponseObjectStreamResponseReasoningSummaryTextDone:
description: "Streaming event for when reasoning summary text is completed.\n\n:param text: Final complete summary text\n:param item_id: Unique identifier of the output item\n:param output_index: Index position of the output item\n:param sequence_number: Sequential number for ordering streaming events\n:param summary_index: Index of the summary part within the reasoning summary\n:param type: Event type identifier, always \"response.reasoning_summary_text.done\""
properties:
text:
description: Final complete summary text
title: Text
type: string
item_id:
description: Unique identifier of the output item
title: Item Id
type: string
output_index:
description: Index position of the output item
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
summary_index:
description: Index of the summary part within the reasoning summary
title: Summary Index
type: integer
type:
const: response.reasoning_summary_text.done
default: response.reasoning_summary_text.done
description: Event type identifier, always "response.reasoning_summary_text.done"
title: Type
type: string
required:
- text
- item_id
- output_index
- sequence_number
- summary_index
title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone
type: object
OpenAIResponseObjectStreamResponseReasoningTextDelta:
description: "Streaming event for incremental reasoning text updates.\n\n:param content_index: Index position of the reasoning content part\n:param delta: Incremental reasoning text being added\n:param item_id: Unique identifier of the output item being updated\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.reasoning_text.delta\""
properties:
content_index:
description: Index position of the reasoning content part
title: Content Index
type: integer
delta:
description: Incremental reasoning text being added
title: Delta
type: string
item_id:
description: Unique identifier of the output item being updated
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.reasoning_text.delta
default: response.reasoning_text.delta
description: Event type identifier, always "response.reasoning_text.delta"
title: Type
type: string
required:
- content_index
- delta
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseReasoningTextDelta
type: object
OpenAIResponseObjectStreamResponseReasoningTextDone:
description: "Streaming event for when reasoning text is completed.\n\n:param content_index: Index position of the reasoning content part\n:param text: Final complete reasoning text\n:param item_id: Unique identifier of the completed output item\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.reasoning_text.done\""
properties:
content_index:
description: Index position of the reasoning content part
title: Content Index
type: integer
text:
description: Final complete reasoning text
title: Text
type: string
item_id:
description: Unique identifier of the completed output item
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.reasoning_text.done
default: response.reasoning_text.done
description: Event type identifier, always "response.reasoning_text.done"
title: Type
type: string
required:
- content_index
- text
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseReasoningTextDone
type: object
OpenAIResponseObjectStreamResponseRefusalDelta:
description: "Streaming event for incremental refusal text updates.\n\n:param content_index: Index position of the content part\n:param delta: Incremental refusal text being added\n:param item_id: Unique identifier of the output item\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.refusal.delta\""
properties:
content_index:
description: Index position of the content part
title: Content Index
type: integer
delta:
description: Incremental refusal text being added
title: Delta
type: string
item_id:
description: Unique identifier of the output item
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.refusal.delta
default: response.refusal.delta
description: Event type identifier, always "response.refusal.delta"
title: Type
type: string
required:
- content_index
- delta
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseRefusalDelta
type: object
OpenAIResponseObjectStreamResponseRefusalDone:
description: "Streaming event for when refusal text is completed.\n\n:param content_index: Index position of the content part\n:param refusal: Final complete refusal text\n:param item_id: Unique identifier of the output item\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.refusal.done\""
properties:
content_index:
description: Index position of the content part
title: Content Index
type: integer
refusal:
description: Final complete refusal text
title: Refusal
type: string
item_id:
description: Unique identifier of the output item
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.refusal.done
default: response.refusal.done
description: Event type identifier, always "response.refusal.done"
title: Type
type: string
required:
- content_index
- refusal
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseRefusalDone
type: object
OpenAIResponseObjectStreamResponseWebSearchCallCompleted:
description: "Streaming event for completed web search calls.\n\n:param item_id: Unique identifier of the completed web search call\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.web_search_call.completed\""
properties:
item_id:
description: Unique identifier of the completed web search call
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.web_search_call.completed
default: response.web_search_call.completed
description: Event type identifier, always "response.web_search_call.completed"
title: Type
type: string
required:
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted
type: object
OpenAIResponseObjectStreamResponseWebSearchCallInProgress:
description: "Streaming event for web search calls in progress.\n\n:param item_id: Unique identifier of the web search call\n:param output_index: Index position of the item in the output list\n:param sequence_number: Sequential number for ordering streaming events\n:param type: Event type identifier, always \"response.web_search_call.in_progress\""
properties:
item_id:
description: Unique identifier of the web search call
title: Item Id
type: string
output_index:
description: Index position of the item in the output list
title: Output Index
type: integer
sequence_number:
description: Sequential number for ordering streaming events
title: Sequence Number
type: integer
type:
const: response.web_search_call.in_progress
default: response.web_search_call.in_progress
description: Event type identifier, always "response.web_search_call.in_progress"
title: Type
type: string
required:
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress
type: object
OpenAIResponseObjectStreamResponseWebSearchCallSearching:
properties:
item_id:
title: Item Id
type: string
output_index:
title: Output Index
type: integer
sequence_number:
title: Sequence Number
type: integer
type:
const: response.web_search_call.searching
default: response.web_search_call.searching
title: Type
type: string
required:
- item_id
- output_index
- sequence_number
title: OpenAIResponseObjectStreamResponseWebSearchCallSearching
type: object
OpenAIResponseObjectWithInput:
$defs:
AllowedToolsFilter:
description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed"
properties:
tool_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
description: List of specific tool names that are allowed
title: Tool Names
title: AllowedToolsFilter
type: object
MCPListToolsTool:
description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
properties:
input_schema:
additionalProperties: true
description: JSON schema defining the tool's input parameters
title: Input Schema
type: object
name:
description: Name of the tool
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the tool does
title: Description
required:
- input_schema
- name
title: MCPListToolsTool
type: object
OpenAIResponseAnnotationCitation:
description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource"
properties:
type:
const: url_citation
default: url_citation
description: Annotation type identifier, always "url_citation"
title: Type
type: string
end_index:
description: End position of the citation span in the content
title: End Index
type: integer
start_index:
description: Start position of the citation span in the content
title: Start Index
type: integer
title:
description: Title of the referenced web resource
title: Title
type: string
url:
description: URL of the referenced web resource
title: Url
type: string
required:
- end_index
- start_index
- title
- url
title: OpenAIResponseAnnotationCitation
type: object
OpenAIResponseAnnotationContainerFileCitation:
properties:
type:
const: container_file_citation
default: container_file_citation
title: Type
type: string
container_id:
title: Container Id
type: string
end_index:
title: End Index
type: integer
file_id:
title: File Id
type: string
filename:
title: Filename
type: string
start_index:
title: Start Index
type: integer
required:
- container_id
- end_index
- file_id
- filename
- start_index
title: OpenAIResponseAnnotationContainerFileCitation
type: object
OpenAIResponseAnnotationFileCitation:
description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content"
properties:
type:
const: file_citation
default: file_citation
description: Annotation type identifier, always "file_citation"
title: Type
type: string
file_id:
description: Unique identifier of the referenced file
title: File Id
type: string
filename:
description: Name of the referenced file
title: Filename
type: string
index:
description: Position index of the citation within the content
title: Index
type: integer
required:
- file_id
- filename
- index
title: OpenAIResponseAnnotationFileCitation
type: object
OpenAIResponseAnnotationFilePath:
properties:
type:
const: file_path
default: file_path
title: Type
type: string
file_id:
title: File Id
type: string
index:
title: Index
type: integer
required:
- file_id
- index
title: OpenAIResponseAnnotationFilePath
type: object
OpenAIResponseContentPartRefusal:
description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model"
properties:
type:
const: refusal
default: refusal
description: Content part type identifier, always "refusal"
title: Type
type: string
refusal:
description: Refusal text supplied by the model
title: Refusal
type: string
required:
- refusal
title: OpenAIResponseContentPartRefusal
type: object
OpenAIResponseError:
description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure"
properties:
code:
description: Error code identifying the type of failure
title: Code
type: string
message:
description: Human-readable error message describing the failure
title: Message
type: string
required:
- code
- message
title: OpenAIResponseError
type: object
OpenAIResponseInputFunctionToolCallOutput:
description: This represents the output of a function call that gets passed back to the model.
properties:
call_id:
title: Call Id
type: string
output:
title: Output
type: string
type:
const: function_call_output
default: function_call_output
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- call_id
- output
title: OpenAIResponseInputFunctionToolCallOutput
type: object
OpenAIResponseInputMessageContentFile:
description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model."
properties:
type:
const: input_file
default: input_file
description: The type of the input item. Always `input_file`.
title: Type
type: string
file_data:
anyOf:
- type: string
- type: 'null'
description: The data of the file to be sent to the model.
title: File Data
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
file_url:
anyOf:
- type: string
- type: 'null'
description: The URL of the file to be sent to the model.
title: File Url
filename:
anyOf:
- type: string
- type: 'null'
description: The name of the file to be sent to the model.
title: Filename
title: OpenAIResponseInputMessageContentFile
type: object
OpenAIResponseInputMessageContentImage:
description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content"
properties:
detail:
anyOf:
- const: low
type: string
- const: high
type: string
- const: auto
type: string
default: auto
description: Level of detail for image processing, can be "low", "high", or "auto"
title: Detail
type:
const: input_image
default: input_image
description: Content type identifier, always "input_image"
title: Type
type: string
file_id:
anyOf:
- type: string
- type: 'null'
description: The ID of the file to be sent to the model.
title: File Id
image_url:
anyOf:
- type: string
- type: 'null'
description: URL of the image content
title: Image Url
title: OpenAIResponseInputMessageContentImage
type: object
OpenAIResponseInputMessageContentText:
description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\""
properties:
text:
description: The text content of the input message
title: Text
type: string
type:
const: input_text
default: input_text
description: Content type identifier, always "input_text"
title: Type
type: string
required:
- text
title: OpenAIResponseInputMessageContentText
type: object
OpenAIResponseInputToolFileSearch:
description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results"
properties:
type:
const: file_search
default: file_search
description: Tool type identifier, always "file_search"
title: Type
type: string
vector_store_ids:
description: List of vector store identifiers to search within
items:
type: string
title: Vector Store Ids
type: array
filters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: Additional filters to apply to the search
title: Filters
max_num_results:
anyOf:
- maximum: 50
minimum: 1
type: integer
- type: 'null'
default: 10
description: Maximum number of search results to return (1-50)
title: Max Num Results
ranking_options:
anyOf:
- $ref: '#/components/schemas/SearchRankingOptions'
- type: 'null'
description: Options for ranking and scoring search results
required:
- vector_store_ids
title: OpenAIResponseInputToolFileSearch
type: object
OpenAIResponseInputToolFunction:
description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation"
properties:
type:
const: function
default: function
description: Tool type identifier, always "function"
title: Type
type: string
name:
description: Name of the function that can be called
title: Name
type: string
description:
anyOf:
- type: string
- type: 'null'
description: Description of what the function does
title: Description
parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
description: JSON schema defining the function's parameters
title: Parameters
strict:
anyOf:
- type: boolean
- type: 'null'
description: Whether to enforce strict parameter validation
title: Strict
required:
- name
title: OpenAIResponseInputToolFunction
type: object
OpenAIResponseInputToolWebSearch:
description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\""
properties:
type:
anyOf:
- const: web_search
type: string
- const: web_search_preview
type: string
- const: web_search_preview_2025_03_11
type: string
default: web_search
description: Web search tool type variant to use
title: Type
search_context_size:
anyOf:
- pattern: ^low|medium|high$
type: string
- type: 'null'
default: medium
description: Size of search context, must be "low", "medium", or "high"
title: Search Context Size
title: OpenAIResponseInputToolWebSearch
type: object
OpenAIResponseMCPApprovalRequest:
description: A request for human approval of a tool invocation.
properties:
arguments:
title: Arguments
type: string
id:
title: Id
type: string
name:
title: Name
type: string
server_label:
title: Server Label
type: string
type:
const: mcp_approval_request
default: mcp_approval_request
title: Type
type: string
required:
- arguments
- id
- name
- server_label
title: OpenAIResponseMCPApprovalRequest
type: object
OpenAIResponseMCPApprovalResponse:
description: A response to an MCP approval request.
properties:
approval_request_id:
title: Approval Request Id
type: string
approve:
title: Approve
type: boolean
type:
const: mcp_approval_response
default: mcp_approval_response
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
reason:
anyOf:
- type: string
- type: 'null'
title: Reason
required:
- approval_request_id
- approve
title: OpenAIResponseMCPApprovalResponse
type: object
OpenAIResponseMessage:
description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios."
properties:
content:
anyOf:
- type: string
- items:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: array
- items:
discriminator:
mapping:
output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/$defs/OpenAIResponseContentPartRefusal'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
type: array
title: Content
role:
anyOf:
- const: system
type: string
- const: developer
type: string
- const: user
type: string
- const: assistant
type: string
title: Role
type:
const: message
default: message
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
title: Id
status:
anyOf:
- type: string
- type: 'null'
title: Status
required:
- content
- role
title: OpenAIResponseMessage
type: object
OpenAIResponseOutputMessageContentOutputText:
properties:
text:
title: Text
type: string
type:
const: output_text
default: output_text
title: Type
type: string
annotations:
items:
discriminator:
mapping:
container_file_citation: '#/$defs/OpenAIResponseAnnotationContainerFileCitation'
file_citation: '#/$defs/OpenAIResponseAnnotationFileCitation'
file_path: '#/$defs/OpenAIResponseAnnotationFilePath'
url_citation: '#/$defs/OpenAIResponseAnnotationCitation'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
- $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath'
title: Annotations
type: array
required:
- text
title: OpenAIResponseOutputMessageContentOutputText
type: object
OpenAIResponseOutputMessageFileSearchToolCall:
description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation"
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
queries:
description: List of search queries executed
items:
type: string
title: Queries
type: array
status:
description: Current status of the file search operation
title: Status
type: string
type:
const: file_search_call
default: file_search_call
description: Tool call type identifier, always "file_search_call"
title: Type
type: string
results:
anyOf:
- items:
$ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults'
type: array
- type: 'null'
description: Search results returned by the file search operation
title: Results
required:
- id
- queries
- status
title: OpenAIResponseOutputMessageFileSearchToolCall
type: object
OpenAIResponseOutputMessageFileSearchToolCallResults:
description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result"
properties:
attributes:
additionalProperties: true
description: Key-value attributes associated with the file
title: Attributes
type: object
file_id:
description: Unique identifier of the file containing the result
title: File Id
type: string
filename:
description: Name of the file containing the result
title: Filename
type: string
score:
description: Relevance score for this search result (between 0 and 1)
title: Score
type: number
text:
description: Text content of the search result
title: Text
type: string
required:
- attributes
- file_id
- filename
- score
- text
title: OpenAIResponseOutputMessageFileSearchToolCallResults
type: object
OpenAIResponseOutputMessageFunctionToolCall:
description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution"
properties:
call_id:
description: Unique identifier for the function call
title: Call Id
type: string
name:
description: Name of the function being called
title: Name
type: string
arguments:
description: JSON string containing the function arguments
title: Arguments
type: string
type:
const: function_call
default: function_call
description: Tool call type identifier, always "function_call"
title: Type
type: string
id:
anyOf:
- type: string
- type: 'null'
description: Additional identifier for the tool call
title: Id
status:
anyOf:
- type: string
- type: 'null'
description: Current status of the function call execution
title: Status
required:
- call_id
- name
- arguments
title: OpenAIResponseOutputMessageFunctionToolCall
type: object
OpenAIResponseOutputMessageMCPCall:
description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call"
properties:
id:
description: Unique identifier for this MCP call
title: Id
type: string
type:
const: mcp_call
default: mcp_call
description: Tool call type identifier, always "mcp_call"
title: Type
type: string
arguments:
description: JSON string containing the MCP call arguments
title: Arguments
type: string
name:
description: Name of the MCP method being called
title: Name
type: string
server_label:
description: Label identifying the MCP server handling the call
title: Server Label
type: string
error:
anyOf:
- type: string
- type: 'null'
description: Error message if the MCP call failed
title: Error
output:
anyOf:
- type: string
- type: 'null'
description: Output result from the successful MCP call
title: Output
required:
- id
- arguments
- name
- server_label
title: OpenAIResponseOutputMessageMCPCall
type: object
OpenAIResponseOutputMessageMCPListTools:
description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server"
properties:
id:
description: Unique identifier for this MCP list tools operation
title: Id
type: string
type:
const: mcp_list_tools
default: mcp_list_tools
description: Tool call type identifier, always "mcp_list_tools"
title: Type
type: string
server_label:
description: Label identifying the MCP server providing the tools
title: Server Label
type: string
tools:
description: List of available tools provided by the MCP server
items:
$ref: '#/components/schemas/MCPListToolsTool'
title: Tools
type: array
required:
- id
- server_label
- tools
title: OpenAIResponseOutputMessageMCPListTools
type: object
OpenAIResponseOutputMessageWebSearchToolCall:
description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\""
properties:
id:
description: Unique identifier for this tool call
title: Id
type: string
status:
description: Current status of the web search operation
title: Status
type: string
type:
const: web_search_call
default: web_search_call
description: Tool call type identifier, always "web_search_call"
title: Type
type: string
required:
- id
- status
title: OpenAIResponseOutputMessageWebSearchToolCall
type: object
OpenAIResponsePrompt:
description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)"
properties:
id:
description: Unique identifier of the prompt template
title: Id
type: string
variables:
anyOf:
- additionalProperties:
discriminator:
mapping:
input_file: '#/$defs/OpenAIResponseInputMessageContentFile'
input_image: '#/$defs/OpenAIResponseInputMessageContentImage'
input_text: '#/$defs/OpenAIResponseInputMessageContentText'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage'
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile'
type: object
- type: 'null'
description: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files.
title: Variables
version:
anyOf:
- type: string
- type: 'null'
description: Version number of the prompt to use (defaults to latest if not specified)
title: Version
required:
- id
title: OpenAIResponsePrompt
type: object
OpenAIResponseText:
description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements"
properties:
format:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseTextFormat'
- type: 'null'
description: Text format configuration specifying output format requirements
title: OpenAIResponseText
type: object
OpenAIResponseTextFormat:
description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema."
properties:
type:
anyOf:
- const: text
type: string
- const: json_schema
type: string
- const: json_object
type: string
title: Type
name:
anyOf:
- type: string
- type: 'null'
title: Name
schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Schema
description:
anyOf:
- type: string
- type: 'null'
title: Description
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
title: OpenAIResponseTextFormat
type: object
OpenAIResponseToolMCP:
description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server"
properties:
type:
const: mcp
default: mcp
description: Tool type identifier, always "mcp"
title: Type
type: string
server_label:
description: Label to identify this MCP server
title: Server Label
type: string
allowed_tools:
anyOf:
- items:
type: string
type: array
- $ref: '#/components/schemas/AllowedToolsFilter'
- type: 'null'
description: Restriction on which tools can be used from this server
title: Allowed Tools
required:
- server_label
title: OpenAIResponseToolMCP
type: object
OpenAIResponseUsage:
description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage"
properties:
input_tokens:
description: Number of tokens in the input
title: Input Tokens
type: integer
output_tokens:
description: Number of tokens in the output
title: Output Tokens
type: integer
total_tokens:
description: Total tokens used (input + output)
title: Total Tokens
type: integer
input_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails'
- type: 'null'
description: Detailed breakdown of input token usage
output_tokens_details:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails'
- type: 'null'
description: Detailed breakdown of output token usage
required:
- input_tokens
- output_tokens
- total_tokens
title: OpenAIResponseUsage
type: object
OpenAIResponseUsageInputTokensDetails:
description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache"
properties:
cached_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens retrieved from cache
title: Cached Tokens
title: OpenAIResponseUsageInputTokensDetails
type: object
OpenAIResponseUsageOutputTokensDetails:
description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)"
properties:
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
description: Number of tokens used for reasoning (o1/o3 models)
title: Reasoning Tokens
title: OpenAIResponseUsageOutputTokensDetails
type: object
SearchRankingOptions:
description: Options for ranking and filtering search results.
properties:
ranker:
anyOf:
- type: string
- type: 'null'
title: Ranker
score_threshold:
anyOf:
- type: number
- type: 'null'
default: 0.0
title: Score Threshold
title: SearchRankingOptions
type: object
description: "OpenAI response object extended with input context information.\n\n:param input: List of input items that led to this response"
properties:
created_at:
description: Unix timestamp when the response was created
title: Created At
type: integer
error:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseError'
- type: 'null'
description: Error details if the response generation failed
id:
description: Unique identifier for this response
title: Id
type: string
model:
description: Model identifier used for generation
title: Model
type: string
object:
const: response
default: response
description: Object type identifier, always "response"
title: Object
type: string
output:
description: List of generated output items (messages, tool calls, etc.)
items:
discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
title: Output
type: array
parallel_tool_calls:
default: false
description: Whether tool calls can be executed in parallel
title: Parallel Tool Calls
type: boolean
previous_response_id:
anyOf:
- type: string
- type: 'null'
description: ID of the previous response in a conversation
title: Previous Response Id
prompt:
anyOf:
- $ref: '#/components/schemas/OpenAIResponsePrompt'
- type: 'null'
description: Reference to a prompt template and its variables.
status:
description: Current status of the response generation
title: Status
type: string
temperature:
anyOf:
- type: number
- type: 'null'
description: Sampling temperature used for generation
title: Temperature
text:
$ref: '#/components/schemas/OpenAIResponseText'
description: Text formatting configuration for the response
top_p:
anyOf:
- type: number
- type: 'null'
description: Nucleus sampling parameter used for generation
title: Top P
tools:
anyOf:
- items:
discriminator:
mapping:
file_search: '#/$defs/OpenAIResponseInputToolFileSearch'
function: '#/$defs/OpenAIResponseInputToolFunction'
mcp: '#/$defs/OpenAIResponseToolMCP'
web_search: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch'
web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
type: array
- type: 'null'
description: An array of tools the model may call while generating a response.
title: Tools
truncation:
anyOf:
- type: string
- type: 'null'
description: Truncation strategy applied to the response
title: Truncation
usage:
anyOf:
- $ref: '#/components/schemas/OpenAIResponseUsage'
- type: 'null'
description: Token usage information for the response
instructions:
anyOf:
- type: string
- type: 'null'
description: System message inserted into the model's context
title: Instructions
input:
description: List of input items that led to this response
items:
anyOf:
- discriminator:
mapping:
file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall'
function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall'
mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest'
mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall'
mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools'
message: '#/$defs/OpenAIResponseMessage'
web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall'
propertyName: type
oneOf:
- $ref: '#/components/schemas/OpenAIResponseMessage'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
- $ref: '#/components/schemas/OpenAIResponseMessage'
title: Input
type: array
required:
- created_at
- id
- model
- output
- status
- input
title: OpenAIResponseObjectWithInput
type: object
ImageContentItem:
$defs:
URL:
description: A URL reference to external content.
properties:
uri:
title: Uri
type: string
required:
- uri
title: URL
type: object
_URLOrData:
description: A URL or a base64 encoded string.
properties:
url:
anyOf:
- $ref: '#/components/schemas/URL'
- type: 'null'
data:
anyOf:
- type: string
- type: 'null'
contentEncoding: base64
title: Data
title: _URLOrData
type: object
description: A image content item.
properties:
type:
const: image
default: image
title: Type
type: string
image:
$ref: '#/components/schemas/_URLOrData'
required:
- image
title: ImageContentItem
type: object
ImageDelta:
description: An image content delta for streaming responses.
properties:
type:
const: image
default: image
title: Type
type: string
image:
format: binary
title: Image
type: string
required:
- image
title: ImageDelta
type: object
TextDelta:
description: A text content delta for streaming responses.
properties:
type:
const: text
default: text
title: Type
type: string
text:
title: Text
type: string
required:
- text
title: TextDelta
type: object
ToolCallDelta:
$defs:
BuiltinTool:
enum:
- brave_search
- wolfram_alpha
- photogen
- code_interpreter
title: BuiltinTool
type: string
ToolCall:
properties:
call_id:
title: Call Id
type: string
tool_name:
anyOf:
- $ref: '#/components/schemas/BuiltinTool'
- type: string
title: Tool Name
arguments:
title: Arguments
type: string
required:
- call_id
- tool_name
- arguments
title: ToolCall
type: object
ToolCallParseStatus:
description: Status of tool call parsing during streaming.
enum:
- started
- in_progress
- failed
- succeeded
title: ToolCallParseStatus
type: string
description: A tool call content delta for streaming responses.
properties:
type:
const: tool_call
default: tool_call
title: Type
type: string
tool_call:
anyOf:
- type: string
- $ref: '#/components/schemas/ToolCall'
title: Tool Call
parse_status:
$ref: '#/components/schemas/ToolCallParseStatus'
required:
- tool_call
- parse_status
title: ToolCallDelta
type: object
DialogType:
description: "Parameter type for dialog data with semantic output labels.\n\n:param type: Discriminator type. Always \"dialog\""
properties:
type:
const: dialog
default: dialog
title: Type
type: string
title: DialogType
type: object