OpenAPI 接口#

OpenAI 兼容服务器接口#

POST /abort_request#

Abort Request

Abort an ongoing request.

Request body:

{
  "abort_all":{
    "default":false,
    "title":"Abort All",
    "type":"boolean"
  },
  "abort_message":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Abort Message"
  },
  "finished_reason":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "title":"Finished Reason"
  },
  "session_id":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":-1,
    "title":"Session Id"
  }
}

Example request:

POST /abort_request HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "abort_all": true,
    "abort_message": "string",
    "finished_reason": {},
    "session_id": 1
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /destroy_weights_update_group#

Destroy Weights Update Group

Tear down a previously initialized weights-update group.

Request body:

{
  "group_name":{
    "title":"Group Name",
    "type":"string"
  }
}

Example request:

POST /destroy_weights_update_group HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group_name": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

GET /distserve/engine_info#

Engine Info

Example request:

GET /distserve/engine_info HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /distserve/free_cache#

Free Cache

Request body:

{
  "remote_engine_id":{
    "title":"Remote Engine Id",
    "type":"string"
  },
  "remote_session_id":{
    "title":"Remote Session Id",
    "type":"integer"
  }
}

Example request:

POST /distserve/free_cache HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "remote_engine_id": "string",
    "remote_session_id": 1
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /distserve/p2p_connect#

P2P Connect

Request body:

{
  "protocol":{
    "description":"Migration Transport Protocol.\n\nAttributes:\n    RDMA: IB or RoCEv1/v2.\n    NVLINK: High device-to-device link.\n\nWarning: By now, only `GPU Directed RDMA` is supported in DistServe.\n    We preserve several protocol and will be implemented in the future.",
    "enum":[
      1,
      2,
      3
    ],
    "title":"MigrationProtocol",
    "type":"integer"
  },
  "remote_engine_endpoint_info":{
    "properties":{
      "zmq_address":{
        "title":"Zmq Address",
        "type":"string"
      }
    },
    "required":[
      "zmq_address"
    ],
    "title":"DistServeEngineEndpointInfo",
    "type":"object"
  },
  "remote_engine_id":{
    "title":"Remote Engine Id",
    "type":"string"
  },
  "remote_kvtransfer_endpoint_info":{
    "items":{
      "properties":{
        "endpoint_info":{
          "title":"Endpoint Info",
          "type":"string"
        },
        "protocol":{
          "description":"Migration Transport Protocol.\n\nAttributes:\n    RDMA: IB or RoCEv1/v2.\n    NVLINK: High device-to-device link.\n\nWarning: By now, only `GPU Directed RDMA` is supported in DistServe.\n    We preserve several protocol and will be implemented in the future.",
          "enum":[
            1,
            2,
            3
          ],
          "title":"MigrationProtocol",
          "type":"integer"
        }
      },
      "required":[
        "protocol",
        "endpoint_info"
      ],
      "title":"DistServeKVTransferEndpointInfo",
      "type":"object"
    },
    "title":"Remote Kvtransfer Endpoint Info",
    "type":"array"
  }
}

Example request:

POST /distserve/p2p_connect HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "protocol": 1,
    "remote_engine_endpoint_info": {
        "zmq_address": "string"
    },
    "remote_engine_id": "string",
    "remote_kvtransfer_endpoint_info": [
        {
            "endpoint_info": "string",
            "protocol": 1
        }
    ]
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /distserve/p2p_drop_connect#

P2P Drop Connect

Request body:

{
  "engine_id":{
    "title":"Engine Id",
    "type":"string"
  },
  "remote_engine_id":{
    "title":"Remote Engine Id",
    "type":"string"
  }
}

Example request:

POST /distserve/p2p_drop_connect HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "engine_id": "string",
    "remote_engine_id": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /distserve/p2p_initialize#

P2P Initialize

Request body:

{
  "local_engine_config":{
    "description":"DistServe Engine Config.\n\nIn Disaggregated LLM Serving, we need to get engine info of each\nPD Peer for the following reason:\n    1. Cache: The stride of cache block for correct offset of KV Transfer.\n    2. Parallel: Prefill and decode use different parallel strategy to\n        achieve high SLO Attainment or high throughput. In this situation,\n        we need to caclculate which prefill-decode worker peers need to connect.\n        For example, prefill worker use pp4 and decode worker use tp2pp2,\n        the perfill-decode worker conn peer is (0, 0), (0, 1), (1, 0), (1, 1),\n        (2, 2), (2, 3), (3, 2), (3, 3). Instead, under the situation of\n        (tp4, tp4), perfill-decode worker conn peer is (0, 0), (1, 1), (2, 2),\n        (3, 3).",
    "properties":{
      "block_size":{
        "title":"Block Size",
        "type":"integer"
      },
      "dp_rank":{
        "title":"Dp Rank",
        "type":"integer"
      },
      "dp_size":{
        "title":"Dp Size",
        "type":"integer"
      },
      "ep_size":{
        "title":"Ep Size",
        "type":"integer"
      },
      "num_cpu_blocks":{
        "title":"Num Cpu Blocks",
        "type":"integer"
      },
      "num_gpu_blocks":{
        "title":"Num Gpu Blocks",
        "type":"integer"
      },
      "pp_size":{
        "anyOf":[
          {
            "type":"integer"
          },
          {
            "type":"null"
          }
        ],
        "title":"Pp Size"
      },
      "tp_size":{
        "title":"Tp Size",
        "type":"integer"
      }
    },
    "required":[
      "tp_size",
      "ep_size",
      "dp_size",
      "pp_size",
      "dp_rank",
      "block_size",
      "num_cpu_blocks",
      "num_gpu_blocks"
    ],
    "title":"DistServeEngineConfig",
    "type":"object"
  },
  "local_engine_id":{
    "title":"Local Engine Id",
    "type":"string"
  },
  "nvlink_config":{
    "anyOf":[
      {
        "description":"TODO: Add NVLink Protocol",
        "properties":{},
        "title":"DistServeNVLinkConfig",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "protocol":{
    "description":"Migration Transport Protocol.\n\nAttributes:\n    RDMA: IB or RoCEv1/v2.\n    NVLINK: High device-to-device link.\n\nWarning: By now, only `GPU Directed RDMA` is supported in DistServe.\n    We preserve several protocol and will be implemented in the future.",
    "enum":[
      1,
      2,
      3
    ],
    "title":"MigrationProtocol",
    "type":"integer"
  },
  "rank":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Rank"
  },
  "rdma_config":{
    "anyOf":[
      {
        "description":"DistServe RDMA Config.\n\nArgs:\n    with_gdr: default to True.\n    link_type: default to `RDMALinkType.RoCE`.\n\nWarning: Only GDR is supported by now.\nWarning: Technically, both RoCE and IB are supported.\n    However, IB mode is not tested because of unavailable\n    testing envoriment.",
        "properties":{
          "link_type":{
            "description":"RDMA Link Type.",
            "enum":[
              1,
              2
            ],
            "title":"RDMALinkType",
            "type":"integer"
          },
          "with_gdr":{
            "default":true,
            "title":"With Gdr",
            "type":"boolean"
          }
        },
        "title":"DistServeRDMAConfig",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "remote_engine_config":{
    "description":"DistServe Engine Config.\n\nIn Disaggregated LLM Serving, we need to get engine info of each\nPD Peer for the following reason:\n    1. Cache: The stride of cache block for correct offset of KV Transfer.\n    2. Parallel: Prefill and decode use different parallel strategy to\n        achieve high SLO Attainment or high throughput. In this situation,\n        we need to caclculate which prefill-decode worker peers need to connect.\n        For example, prefill worker use pp4 and decode worker use tp2pp2,\n        the perfill-decode worker conn peer is (0, 0), (0, 1), (1, 0), (1, 1),\n        (2, 2), (2, 3), (3, 2), (3, 3). Instead, under the situation of\n        (tp4, tp4), perfill-decode worker conn peer is (0, 0), (1, 1), (2, 2),\n        (3, 3).",
    "properties":{
      "block_size":{
        "title":"Block Size",
        "type":"integer"
      },
      "dp_rank":{
        "title":"Dp Rank",
        "type":"integer"
      },
      "dp_size":{
        "title":"Dp Size",
        "type":"integer"
      },
      "ep_size":{
        "title":"Ep Size",
        "type":"integer"
      },
      "num_cpu_blocks":{
        "title":"Num Cpu Blocks",
        "type":"integer"
      },
      "num_gpu_blocks":{
        "title":"Num Gpu Blocks",
        "type":"integer"
      },
      "pp_size":{
        "anyOf":[
          {
            "type":"integer"
          },
          {
            "type":"null"
          }
        ],
        "title":"Pp Size"
      },
      "tp_size":{
        "title":"Tp Size",
        "type":"integer"
      }
    },
    "required":[
      "tp_size",
      "ep_size",
      "dp_size",
      "pp_size",
      "dp_rank",
      "block_size",
      "num_cpu_blocks",
      "num_gpu_blocks"
    ],
    "title":"DistServeEngineConfig",
    "type":"object"
  },
  "remote_engine_id":{
    "title":"Remote Engine Id",
    "type":"string"
  },
  "tcp_config":{
    "anyOf":[
      {
        "description":"TODO: Add TCP Protocol",
        "properties":{},
        "title":"DistServeTCPConfig",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  }
}

Example request:

POST /distserve/p2p_initialize HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "local_engine_config": {
        "block_size": 1,
        "dp_rank": 1,
        "dp_size": 1,
        "ep_size": 1,
        "num_cpu_blocks": 1,
        "num_gpu_blocks": 1,
        "pp_size": 1,
        "tp_size": 1
    },
    "local_engine_id": "string",
    "protocol": 1,
    "rank": 1,
    "rdma_config": {
        "link_type": 1,
        "with_gdr": true
    },
    "remote_engine_config": {
        "block_size": 1,
        "dp_rank": 1,
        "dp_size": 1,
        "ep_size": 1,
        "num_cpu_blocks": 1,
        "num_gpu_blocks": 1,
        "pp_size": 1,
        "tp_size": 1
    },
    "remote_engine_id": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /generate#

Generate

Request body:

{
  "ignore_eos":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Ignore Eos"
  },
  "image_data":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "items":{
          "anyOf":[
            {
              "type":"string"
            },
            {
              "additionalProperties":true,
              "type":"object"
            }
          ]
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Image Data"
  },
  "include_stop_str_in_output":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Include Stop Str In Output"
  },
  "input_ids":{
    "anyOf":[
      {
        "items":{
          "type":"integer"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Input Ids"
  },
  "max_tokens":{
    "default":128,
    "title":"Max Tokens",
    "type":"integer"
  },
  "media_io_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional kwargs to pass to the media IO processing, keyed by modality.",
    "title":"Media Io Kwargs"
  },
  "min_p":{
    "default":0.0,
    "title":"Min P",
    "type":"number"
  },
  "mm_processor_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional kwargs to pass to the HF processor",
    "title":"Mm Processor Kwargs"
  },
  "prompt":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Prompt"
  },
  "repetition_ngram_size":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Size",
    "type":"integer"
  },
  "repetition_ngram_threshold":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Threshold",
    "type":"integer"
  },
  "repetition_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Repetition Penalty"
  },
  "return_logprob":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "title":"Return Logprob"
  },
  "return_routed_experts":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Return Routed Experts"
  },
  "session_id":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":-1,
    "title":"Session Id"
  },
  "skip_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Skip Special Tokens"
  },
  "spaces_between_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Spaces Between Special Tokens"
  },
  "stop":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Stop"
  },
  "stop_token_ids":{
    "anyOf":[
      {
        "items":{
          "type":"integer"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Stop Token Ids"
  },
  "stream":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Stream"
  },
  "temperature":{
    "default":1.0,
    "title":"Temperature",
    "type":"number"
  },
  "top_k":{
    "default":0,
    "title":"Top K",
    "type":"integer"
  },
  "top_p":{
    "default":1.0,
    "title":"Top P",
    "type":"number"
  }
}

Example request:

POST /generate HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "ignore_eos": true,
    "image_data": "string",
    "include_stop_str_in_output": true,
    "input_ids": [
        1
    ],
    "max_tokens": 1,
    "media_io_kwargs": {},
    "min_p": 1.0,
    "mm_processor_kwargs": {},
    "prompt": "string",
    "repetition_ngram_size": 1,
    "repetition_ngram_threshold": 1,
    "repetition_penalty": 1.0,
    "return_logprob": true,
    "return_routed_experts": true,
    "session_id": 1,
    "skip_special_tokens": true,
    "spaces_between_special_tokens": true,
    "stop": "string",
    "stop_token_ids": [
        1
    ],
    "stream": true,
    "temperature": 1.0,
    "top_k": 1,
    "top_p": 1.0
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /get_ppl#

Get Ppl

Get the perplexity (mean cross-entropy loss) of the input prompt.

The request should be a JSON object with the following fields:

  • input (str | list[int]): the input to score, either raw text or token ids. Text is tokenized with tokenizer.encode (no chat template is applied).

Request body:

{
  "input":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"integer"
        },
        "type":"array"
      }
    ],
    "title":"Input"
  }
}

Example request:

POST /get_ppl HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "input": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

GET /health#

Health

Health check.

Example request:

GET /health HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /init_weights_update_group#

Init Weights Update Group

Initialize the torch.distributed process group used by an external trainer to broadcast weights into this rollout engine.

Request body:

{
  "backend":{
    "default":"nccl",
    "title":"Backend",
    "type":"string"
  },
  "group_name":{
    "title":"Group Name",
    "type":"string"
  },
  "master_address":{
    "title":"Master Address",
    "type":"string"
  },
  "master_port":{
    "title":"Master Port",
    "type":"integer"
  },
  "rank_offset":{
    "title":"Rank Offset",
    "type":"integer"
  },
  "world_size":{
    "title":"World Size",
    "type":"integer"
  }
}

Example request:

POST /init_weights_update_group HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "backend": "string",
    "group_name": "string",
    "master_address": "string",
    "master_port": 1,
    "rank_offset": 1,
    "world_size": 1
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

GET /is_sleeping#

Is Sleeping

Example request:

GET /is_sleeping HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

GET /metrics#

Metrics

[Optional] Prometheus metrics endpoint.

Example request:

GET /metrics HTTP/1.1
Host: example.com
Status Codes:
POST /pooling#

Pooling

Pooling prompts for reward model.

In vLLM documentation, https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html#pooling-api_1, the input format of Pooling API is the same as Embeddings API.

Go to https://platform.openai.com/docs/api-reference/embeddings/create for the Embeddings API specification.

The request should be a JSON object with the following fields:

  • model (str): model name. Available from /v1/models.

  • input (list[int] | list[list[int]] | str | list[str]): input text to be embed

Request body:

{
  "dimensions":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Dimensions"
  },
  "encoding_format":{
    "default":"float",
    "enum":[
      "float",
      "base64"
    ],
    "title":"Encoding Format",
    "type":"string"
  },
  "input":{
    "anyOf":[
      {
        "items":{
          "type":"integer"
        },
        "type":"array"
      },
      {
        "items":{
          "items":{
            "type":"integer"
          },
          "type":"array"
        },
        "type":"array"
      },
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      }
    ],
    "title":"Input"
  },
  "model":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Model"
  },
  "user":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"User"
  }
}

Example request:

POST /pooling HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "dimensions": 1,
    "encoding_format": "float",
    "input": [
        1
    ],
    "model": "string",
    "user": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /sleep#

Sleep

Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

GET /terminate#

Terminate

Terminate server.

Example request:

GET /terminate HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /update_weights#

Update Params

Update weights for the model.

Request body:

{
  "finished":{
    "default":false,
    "title":"Finished",
    "type":"boolean"
  },
  "load_format":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Load Format"
  },
  "serialized_named_tensors":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      },
      {
        "additionalProperties":true,
        "type":"object"
      }
    ],
    "title":"Serialized Named Tensors"
  }
}

Example request:

POST /update_weights HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "finished": true,
    "load_format": "string",
    "serialized_named_tensors": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /update_weights_from_distributed#

Update Weights From Distributed

Receive a bucket of weights through a previously initialized weights- update group and load them into the running model.

Request body:

{
  "dtypes":{
    "items":{
      "type":"string"
    },
    "title":"Dtypes",
    "type":"array"
  },
  "finished":{
    "default":false,
    "title":"Finished",
    "type":"boolean"
  },
  "group_name":{
    "title":"Group Name",
    "type":"string"
  },
  "load_format":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Load Format"
  },
  "names":{
    "items":{
      "type":"string"
    },
    "title":"Names",
    "type":"array"
  },
  "shapes":{
    "items":{
      "items":{
        "type":"integer"
      },
      "type":"array"
    },
    "title":"Shapes",
    "type":"array"
  }
}

Example request:

POST /update_weights_from_distributed HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "dtypes": [
        "string"
    ],
    "finished": true,
    "group_name": "string",
    "load_format": "string",
    "names": [
        "string"
    ],
    "shapes": [
        [
            1
        ]
    ]
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /v1/chat/completions#

Chat Completions V1

Completion API similar to OpenAI’s API.

Refer to https://platform.openai.com/docs/api-reference/chat/create for the API specification.

The request should be a JSON object with the following fields:

  • model: model name. Available from /v1/models.

  • messages: string prompt or chat history in OpenAI format. Chat history example: [{"role": "user", "content": "hi"}].

  • temperature (float): to modulate the next token probability

  • top_p (float): If set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are kept for generation.

  • n (int): How many chat completion choices to generate for each input message. Only support one here.

  • stream: whether to stream the results or not. Default to false.

  • stream_options: Options for streaming response. Only set this when you set stream: true.

  • max_completion_tokens (int | None): output token nums. Default to None.

  • max_tokens (int | None): output token nums. Default to None. Deprecated: Use max_completion_tokens instead.

  • repetition_penalty (float): The parameter for repetition penalty. 1.0 means no penalty

  • stop (str | list[str] | None): To stop generating further tokens. Only accept stop words that’s encoded to one token idex.

  • response_format (dict | None): To generate response according to given schema. Examples:

    {
      "type": "json_schema",
      "json_schema":{
        "name": "test",
        "schema":{
          "properties":{
            "name":{"type":"string"}
          },
          "required":["name"],
          "type":"object"
        }
      }
    }
    

    or {"type": "regex_schema", "regex_schema": "call me [A-Za-z]{1,10}"}

  • logit_bias (dict): Bias to logits. Only supported in pytorch engine.

  • tools (list): A list of tools the model may call. Currently, only internlm2 functions are supported as a tool. Use this to specify a list of functions for which the model can generate JSON inputs.

  • tool_choice (str | object): Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. auto or required will put all the tools informationto the model.

Additional arguments supported by LMDeploy:

  • top_k (int): The number of the highest probability vocabulary tokens to keep for top-k-filtering

  • ignore_eos (bool): indicator for ignoring eos

  • skip_special_tokens (bool): Whether or not to remove special tokens in the decoding. Default to be True.

  • spaces_between_special_tokens (bool): Whether or not to add spaces around special tokens. The behavior of Fast tokenizers is to have this to False. This is setup to True in slow tokenizers.

  • min_new_tokens (int): To generate at least numbers of tokens.

  • min_p (float): Minimum token probability, which will be scaled by the probability of the most likely token. It must be a value between 0 and 1. Typical values are in the 0.01-0.2 range, comparably selective as setting top_p in the 0.99-0.8 range (use the opposite of normal top_p values)

  • repetition_ngram_size (int): N-gram length for repetition early stop (PyTorch engine). 0 disables.

  • repetition_ngram_threshold (int): How many times that n-gram must repeat to trigger early stop. 0 disables.

Currently we do not support the following features:

  • presence_penalty (replaced with repetition_penalty)

  • frequency_penalty (replaced with repetition_penalty)

Request body:

{
  "chat_template_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
    "title":"Chat Template Kwargs"
  },
  "do_preprocess":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Do Preprocess"
  },
  "enable_thinking":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "title":"Enable Thinking"
  },
  "frequency_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Frequency Penalty"
  },
  "ignore_eos":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Ignore Eos"
  },
  "image_data":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "items":{
          "anyOf":[
            {
              "type":"string"
            },
            {
              "additionalProperties":true,
              "type":"object"
            }
          ]
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "description":"Image data for multimodal input. Only used alongside input_ids when messages is empty. Mutually exclusive with non-empty messages. Can be a URL/base64 string, a dict, or a list of these.",
    "examples":[
      null
    ],
    "title":"Image Data"
  },
  "include_stop_str_in_output":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Include Stop Str In Output"
  },
  "input_ids":{
    "anyOf":[
      {
        "items":{
          "type":"integer"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "description":"Token IDs as input. Only used when messages is empty. Mutually exclusive with non-empty messages.",
    "title":"Input Ids"
  },
  "logit_bias":{
    "anyOf":[
      {
        "additionalProperties":{
          "type":"number"
        },
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Logit Bias"
  },
  "logprobs":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Logprobs"
  },
  "max_completion_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens",
    "examples":[
      null
    ],
    "title":"Max Completion Tokens"
  },
  "max_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "deprecated":true,
    "examples":[
      null
    ],
    "title":"Max Tokens"
  },
  "media_io_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional kwargs to pass to the media IO processing, keyed by modality.",
    "title":"Media Io Kwargs"
  },
  "messages":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "additionalProperties":true,
          "type":"object"
        },
        "type":"array"
      }
    ],
    "examples":[
      [
        {
          "content":"hi",
          "role":"user"
        }
      ]
    ],
    "title":"Messages"
  },
  "min_new_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Min New Tokens"
  },
  "min_p":{
    "default":0.0,
    "title":"Min P",
    "type":"number"
  },
  "mm_processor_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional kwargs to pass to the HF processor",
    "title":"Mm Processor Kwargs"
  },
  "model":{
    "title":"Model",
    "type":"string"
  },
  "n":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":1,
    "title":"N"
  },
  "parallel_tool_calls":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Parallel Tool Calls"
  },
  "presence_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Presence Penalty"
  },
  "reasoning_effort":{
    "anyOf":[
      {
        "enum":[
          "low",
          "medium",
          "high"
        ],
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Reasoning Effort"
  },
  "repetition_ngram_size":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Size",
    "type":"integer"
  },
  "repetition_ngram_threshold":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Threshold",
    "type":"integer"
  },
  "repetition_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Repetition Penalty"
  },
  "response_format":{
    "anyOf":[
      {
        "properties":{
          "json_schema":{
            "anyOf":[
              {
                "properties":{
                  "description":{
                    "anyOf":[
                      {
                        "type":"string"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "title":"Description"
                  },
                  "name":{
                    "title":"Name",
                    "type":"string"
                  },
                  "schema":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "type":"object"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "examples":[
                      null
                    ],
                    "title":"Schema"
                  },
                  "strict":{
                    "anyOf":[
                      {
                        "type":"boolean"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "default":false,
                    "title":"Strict"
                  }
                },
                "required":[
                  "name"
                ],
                "title":"JsonSchema",
                "type":"object"
              },
              {
                "type":"null"
              }
            ]
          },
          "regex_schema":{
            "anyOf":[
              {
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Regex Schema"
          },
          "type":{
            "enum":[
              "text",
              "json_object",
              "json_schema",
              "regex_schema"
            ],
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "type"
        ],
        "title":"ResponseFormat",
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ]
  },
  "return_logprob":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Return Logprob"
  },
  "return_routed_experts":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "description":"Whether to return MoE routed expert indices in the response.",
    "title":"Return Routed Experts"
  },
  "return_token_ids":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Return Token Ids"
  },
  "seed":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Seed"
  },
  "session_id":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":-1,
    "title":"Session Id"
  },
  "skip_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Skip Special Tokens"
  },
  "spaces_between_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Spaces Between Special Tokens"
  },
  "stop":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Stop"
  },
  "stream":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Stream"
  },
  "stream_options":{
    "anyOf":[
      {
        "description":"The stream options.",
        "properties":{
          "include_usage":{
            "anyOf":[
              {
                "type":"boolean"
              },
              {
                "type":"null"
              }
            ],
            "default":false,
            "title":"Include Usage"
          }
        },
        "title":"StreamOptions",
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ]
  },
  "temperature":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.7,
    "title":"Temperature"
  },
  "tool_choice":{
    "anyOf":[
      {
        "description":"The tool choice definition.",
        "properties":{
          "function":{
            "description":"The name of tool choice function.",
            "properties":{
              "name":{
                "title":"Name",
                "type":"string"
              }
            },
            "required":[
              "name"
            ],
            "title":"ToolChoiceFuncName",
            "type":"object"
          },
          "type":{
            "const":"function",
            "default":"function",
            "examples":[
              "function"
            ],
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "function"
        ],
        "title":"ToolChoice",
        "type":"object"
      },
      {
        "description":"Allowed tool choice definition.",
        "properties":{
          "allowed_tools":{
            "description":"Constrains the tools available to the model to a pre-defined set.",
            "properties":{
              "mode":{
                "enum":[
                  "auto",
                  "required"
                ],
                "title":"Mode",
                "type":"string"
              },
              "tools":{
                "items":{
                  "additionalProperties":true,
                  "type":"object"
                },
                "title":"Tools",
                "type":"array"
              }
            },
            "required":[
              "mode",
              "tools"
            ],
            "title":"AllowedTools",
            "type":"object"
          },
          "type":{
            "const":"allowed_tools",
            "default":"allowed_tools",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "allowed_tools"
        ],
        "title":"AllowedToolChoice",
        "type":"object"
      },
      {
        "enum":[
          "auto",
          "required",
          "none"
        ],
        "type":"string"
      }
    ],
    "default":"auto",
    "examples":[
      "none"
    ],
    "title":"Tool Choice"
  },
  "tools":{
    "anyOf":[
      {
        "items":{
          "description":"Function wrapper.",
          "properties":{
            "function":{
              "description":"Function descriptions.",
              "properties":{
                "description":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "examples":[
                    null
                  ],
                  "title":"Description"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "parameters":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "type":"object"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Parameters"
                }
              },
              "required":[
                "name"
              ],
              "title":"Function",
              "type":"object"
            },
            "type":{
              "default":"function",
              "examples":[
                "function"
              ],
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "function"
          ],
          "title":"Tool",
          "type":"object"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Tools"
  },
  "top_k":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":40,
    "title":"Top K"
  },
  "top_logprobs":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Top Logprobs"
  },
  "top_p":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Top P"
  },
  "user":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"User"
  }
}

Example request:

POST /v1/chat/completions HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "chat_template_kwargs": {},
    "do_preprocess": true,
    "enable_thinking": true,
    "frequency_penalty": 1.0,
    "ignore_eos": true,
    "image_data": "string",
    "include_stop_str_in_output": true,
    "input_ids": [
        1
    ],
    "logit_bias": {},
    "logprobs": true,
    "max_completion_tokens": 1,
    "max_tokens": 1,
    "media_io_kwargs": {},
    "messages": "string",
    "min_new_tokens": 1,
    "min_p": 1.0,
    "mm_processor_kwargs": {},
    "model": "string",
    "n": 1,
    "parallel_tool_calls": true,
    "presence_penalty": 1.0,
    "reasoning_effort": "low",
    "repetition_ngram_size": 1,
    "repetition_ngram_threshold": 1,
    "repetition_penalty": 1.0,
    "response_format": {
        "json_schema": {
            "description": "string",
            "name": "string",
            "schema": {},
            "strict": true
        },
        "regex_schema": "string",
        "type": "text"
    },
    "return_logprob": true,
    "return_routed_experts": true,
    "return_token_ids": true,
    "seed": 1,
    "session_id": 1,
    "skip_special_tokens": true,
    "spaces_between_special_tokens": true,
    "stop": "string",
    "stream": true,
    "stream_options": {
        "include_usage": true
    },
    "temperature": 1.0,
    "tool_choice": {
        "function": {
            "name": "string"
        },
        "type": "string"
    },
    "tools": [
        {
            "function": {
                "description": "string",
                "name": "string",
                "parameters": {}
            },
            "type": "string"
        }
    ],
    "top_k": 1,
    "top_logprobs": 1,
    "top_p": 1.0,
    "user": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /v1/completions#

Completions V1

Completion API similar to OpenAI’s API.

Go to https://platform.openai.com/docs/api-reference/completions/create for the API specification.

The request should be a JSON object with the following fields:

  • model (str): model name. Available from /v1/models.

  • prompt (str): the input prompt.

  • suffix (str): The suffix that comes after a completion of inserted text.

  • max_completion_tokens (int | None): output token nums. Default to None.

  • max_tokens (int | None): output token nums. Default to 16. Deprecated: Use max_completion_tokens instead.

  • temperature (float): to modulate the next token probability

  • top_p (float): If set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are kept for generation.

  • n (int): How many chat completion choices to generate for each input message. Only support one here.

  • stream: whether to stream the results or not. Default to false.

  • stream_options: Options for streaming response. Only set this when you set stream: true.

  • repetition_penalty (float): The parameter for repetition penalty. 1.0 means no penalty

  • user (str): A unique identifier representing your end-user.

  • stop (str | list[str] | None): To stop generating further tokens. Only accept stop words that’s encoded to one token idex.

Additional arguments supported by LMDeploy:

  • ignore_eos (bool): indicator for ignoring eos

  • skip_special_tokens (bool): Whether or not to remove special tokens in the decoding. Default to be True.

  • spaces_between_special_tokens (bool): Whether or not to add spaces around special tokens. The behavior of Fast tokenizers is to have this to False. This is setup to True in slow tokenizers.

  • top_k (int): The number of the highest probability vocabulary tokens to keep for top-k-filtering

  • min_p (float): Minimum token probability, which will be scaled by the probability of the most likely token. It must be a value between 0 and 1. Typical values are in the 0.01-0.2 range, comparably selective as setting top_p in the 0.99-0.8 range (use the opposite of normal top_p values)

  • repetition_ngram_size (int): N-gram length for repetition early stop (PyTorch engine). 0 disables.

  • repetition_ngram_threshold (int): How many times that n-gram must repeat to trigger early stop. 0 disables.

Currently we do not support the following features:

  • logprobs (not supported yet)

  • presence_penalty (replaced with repetition_penalty)

  • frequency_penalty (replaced with repetition_penalty)

Request body:

{
  "echo":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Echo"
  },
  "frequency_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Frequency Penalty"
  },
  "ignore_eos":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Ignore Eos"
  },
  "logprobs":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Logprobs"
  },
  "max_completion_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens",
    "examples":[
      null
    ],
    "title":"Max Completion Tokens"
  },
  "max_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":16,
    "deprecated":true,
    "examples":[
      16
    ],
    "title":"Max Tokens"
  },
  "min_p":{
    "default":0.0,
    "title":"Min P",
    "type":"number"
  },
  "model":{
    "title":"Model",
    "type":"string"
  },
  "n":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":1,
    "title":"N"
  },
  "presence_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Presence Penalty"
  },
  "prompt":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{},
        "type":"array"
      }
    ],
    "title":"Prompt"
  },
  "repetition_ngram_size":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Size",
    "type":"integer"
  },
  "repetition_ngram_threshold":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Threshold",
    "type":"integer"
  },
  "repetition_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Repetition Penalty"
  },
  "seed":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Seed"
  },
  "session_id":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":-1,
    "title":"Session Id"
  },
  "skip_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Skip Special Tokens"
  },
  "spaces_between_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Spaces Between Special Tokens"
  },
  "stop":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Stop"
  },
  "stream":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Stream"
  },
  "stream_options":{
    "anyOf":[
      {
        "description":"The stream options.",
        "properties":{
          "include_usage":{
            "anyOf":[
              {
                "type":"boolean"
              },
              {
                "type":"null"
              }
            ],
            "default":false,
            "title":"Include Usage"
          }
        },
        "title":"StreamOptions",
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ]
  },
  "suffix":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Suffix"
  },
  "temperature":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.7,
    "title":"Temperature"
  },
  "top_k":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":40,
    "title":"Top K"
  },
  "top_p":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Top P"
  },
  "user":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"User"
  }
}

Example request:

POST /v1/completions HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "echo": true,
    "frequency_penalty": 1.0,
    "ignore_eos": true,
    "logprobs": 1,
    "max_completion_tokens": 1,
    "max_tokens": 1,
    "min_p": 1.0,
    "model": "string",
    "n": 1,
    "presence_penalty": 1.0,
    "prompt": "string",
    "repetition_ngram_size": 1,
    "repetition_ngram_threshold": 1,
    "repetition_penalty": 1.0,
    "seed": 1,
    "session_id": 1,
    "skip_special_tokens": true,
    "spaces_between_special_tokens": true,
    "stop": "string",
    "stream": true,
    "stream_options": {
        "include_usage": true
    },
    "suffix": "string",
    "temperature": 1.0,
    "top_k": 1,
    "top_p": 1.0,
    "user": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /v1/embeddings#

Create Embeddings

Creates embeddings for the text.

Request body:

{
  "input":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      }
    ],
    "title":"Input"
  },
  "model":{
    "title":"Model",
    "type":"string"
  },
  "user":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"User"
  }
}

Example request:

POST /v1/embeddings HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "input": "string",
    "model": "string",
    "user": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /v1/encode#

Encode

Encode prompts.

The request should be a JSON object with the following fields:

  • input: the prompt to be encoded. In str or list[str] format.

  • do_preprocess: whether do preprocess or not. Default to False.

  • add_bos: True when it is the beginning of a conversation. False when it is not. Default to True.

Request body:

{
  "add_bos":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Add Bos"
  },
  "do_preprocess":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Do Preprocess"
  },
  "input":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      }
    ],
    "title":"Input"
  }
}

Example request:

POST /v1/encode HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "add_bos": true,
    "do_preprocess": true,
    "input": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

GET /v1/models#

Available Models

Show available models.

Example request:

GET /v1/models HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /wakeup#

Wakeup

Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /v1/responses#

Create Response

Request body:

{
  "background":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Background"
  },
  "context_management":{
    "anyOf":[
      {
        "items":{
          "additionalProperties":true,
          "type":"object"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Context Management"
  },
  "conversation":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "title":"Conversation"
  },
  "frequency_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "title":"Frequency Penalty"
  },
  "ignore_eos":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Ignore Eos"
  },
  "include":{
    "anyOf":[
      {
        "items":{
          "enum":[
            "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"
          ],
          "type":"string"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Include"
  },
  "include_stop_str_in_output":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Include Stop Str In Output"
  },
  "input":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "anyOf":[
            {
              "additionalProperties":true,
              "description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.",
              "properties":{
                "content":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"A text input to the model.",
                            "properties":{
                              "text":{
                                "title":"Text",
                                "type":"string"
                              },
                              "type":{
                                "const":"input_text",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "text",
                              "type"
                            ],
                            "title":"ResponseInputTextParam",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision).",
                            "properties":{
                              "detail":{
                                "enum":[
                                  "low",
                                  "high",
                                  "auto",
                                  "original"
                                ],
                                "title":"Detail",
                                "type":"string"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "image_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Image Url"
                              },
                              "type":{
                                "const":"input_image",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "detail",
                              "type"
                            ],
                            "title":"ResponseInputImageParam",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A file input to the model.",
                            "properties":{
                              "detail":{
                                "enum":[
                                  "low",
                                  "high"
                                ],
                                "title":"Detail",
                                "type":"string"
                              },
                              "file_data":{
                                "title":"File Data",
                                "type":"string"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "file_url":{
                                "title":"File Url",
                                "type":"string"
                              },
                              "filename":{
                                "title":"Filename",
                                "type":"string"
                              },
                              "type":{
                                "const":"input_file",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"ResponseInputFileParam",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    }
                  ],
                  "title":"Content"
                },
                "phase":{
                  "anyOf":[
                    {
                      "enum":[
                        "commentary",
                        "final_answer"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Phase"
                },
                "role":{
                  "enum":[
                    "user",
                    "assistant",
                    "system",
                    "developer"
                  ],
                  "title":"Role",
                  "type":"string"
                },
                "type":{
                  "const":"message",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "content",
                "role"
              ],
              "title":"EasyInputMessageParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.",
              "properties":{
                "content":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"A text input to the model.",
                        "properties":{
                          "text":{
                            "title":"Text",
                            "type":"string"
                          },
                          "type":{
                            "const":"input_text",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "text",
                          "type"
                        ],
                        "title":"ResponseInputTextParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision).",
                        "properties":{
                          "detail":{
                            "enum":[
                              "low",
                              "high",
                              "auto",
                              "original"
                            ],
                            "title":"Detail",
                            "type":"string"
                          },
                          "file_id":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"File Id"
                          },
                          "image_url":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Image Url"
                          },
                          "type":{
                            "const":"input_image",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "detail",
                          "type"
                        ],
                        "title":"ResponseInputImageParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A file input to the model.",
                        "properties":{
                          "detail":{
                            "enum":[
                              "low",
                              "high"
                            ],
                            "title":"Detail",
                            "type":"string"
                          },
                          "file_data":{
                            "title":"File Data",
                            "type":"string"
                          },
                          "file_id":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"File Id"
                          },
                          "file_url":{
                            "title":"File Url",
                            "type":"string"
                          },
                          "filename":{
                            "title":"Filename",
                            "type":"string"
                          },
                          "type":{
                            "const":"input_file",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ResponseInputFileParam",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Content",
                  "type":"array"
                },
                "role":{
                  "enum":[
                    "user",
                    "system",
                    "developer"
                  ],
                  "title":"Role",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"message",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "content",
                "role"
              ],
              "title":"Message",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"An output message from the model.",
              "properties":{
                "content":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"A text output from the model.",
                        "properties":{
                          "annotations":{
                            "items":{
                              "anyOf":[
                                {
                                  "additionalProperties":true,
                                  "description":"A citation to a file.",
                                  "properties":{
                                    "file_id":{
                                      "title":"File Id",
                                      "type":"string"
                                    },
                                    "filename":{
                                      "title":"Filename",
                                      "type":"string"
                                    },
                                    "index":{
                                      "title":"Index",
                                      "type":"integer"
                                    },
                                    "type":{
                                      "const":"file_citation",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "file_id",
                                    "filename",
                                    "index",
                                    "type"
                                  ],
                                  "title":"AnnotationFileCitation",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A citation for a web resource used to generate a model response.",
                                  "properties":{
                                    "end_index":{
                                      "title":"End Index",
                                      "type":"integer"
                                    },
                                    "start_index":{
                                      "title":"Start Index",
                                      "type":"integer"
                                    },
                                    "title":{
                                      "title":"Title",
                                      "type":"string"
                                    },
                                    "type":{
                                      "const":"url_citation",
                                      "title":"Type",
                                      "type":"string"
                                    },
                                    "url":{
                                      "title":"Url",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "end_index",
                                    "start_index",
                                    "title",
                                    "type",
                                    "url"
                                  ],
                                  "title":"AnnotationURLCitation",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A citation for a container file used to generate a model response.",
                                  "properties":{
                                    "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"
                                    },
                                    "type":{
                                      "const":"container_file_citation",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "container_id",
                                    "end_index",
                                    "file_id",
                                    "filename",
                                    "start_index",
                                    "type"
                                  ],
                                  "title":"AnnotationContainerFileCitation",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A path to a file.",
                                  "properties":{
                                    "file_id":{
                                      "title":"File Id",
                                      "type":"string"
                                    },
                                    "index":{
                                      "title":"Index",
                                      "type":"integer"
                                    },
                                    "type":{
                                      "const":"file_path",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "file_id",
                                    "index",
                                    "type"
                                  ],
                                  "title":"AnnotationFilePath",
                                  "type":"object"
                                }
                              ]
                            },
                            "title":"Annotations",
                            "type":"array"
                          },
                          "logprobs":{
                            "items":{
                              "additionalProperties":true,
                              "description":"The log probability of a token.",
                              "properties":{
                                "bytes":{
                                  "items":{
                                    "type":"integer"
                                  },
                                  "title":"Bytes",
                                  "type":"array"
                                },
                                "logprob":{
                                  "title":"Logprob",
                                  "type":"number"
                                },
                                "token":{
                                  "title":"Token",
                                  "type":"string"
                                },
                                "top_logprobs":{
                                  "items":{
                                    "additionalProperties":true,
                                    "description":"The top log probability of a token.",
                                    "properties":{
                                      "bytes":{
                                        "items":{
                                          "type":"integer"
                                        },
                                        "title":"Bytes",
                                        "type":"array"
                                      },
                                      "logprob":{
                                        "title":"Logprob",
                                        "type":"number"
                                      },
                                      "token":{
                                        "title":"Token",
                                        "type":"string"
                                      }
                                    },
                                    "required":[
                                      "token",
                                      "bytes",
                                      "logprob"
                                    ],
                                    "title":"LogprobTopLogprob",
                                    "type":"object"
                                  },
                                  "title":"Top Logprobs",
                                  "type":"array"
                                }
                              },
                              "required":[
                                "token",
                                "bytes",
                                "logprob",
                                "top_logprobs"
                              ],
                              "title":"Logprob",
                              "type":"object"
                            },
                            "title":"Logprobs",
                            "type":"array"
                          },
                          "text":{
                            "title":"Text",
                            "type":"string"
                          },
                          "type":{
                            "const":"output_text",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "annotations",
                          "text",
                          "type"
                        ],
                        "title":"ResponseOutputTextParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A refusal from the model.",
                        "properties":{
                          "refusal":{
                            "title":"Refusal",
                            "type":"string"
                          },
                          "type":{
                            "const":"refusal",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "refusal",
                          "type"
                        ],
                        "title":"ResponseOutputRefusalParam",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Content",
                  "type":"array"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "phase":{
                  "anyOf":[
                    {
                      "enum":[
                        "commentary",
                        "final_answer"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Phase"
                },
                "role":{
                  "const":"assistant",
                  "title":"Role",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"message",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "content",
                "role",
                "status",
                "type"
              ],
              "title":"ResponseOutputMessageParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The results of a file search tool call.\n\nSee the\n[file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.",
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "queries":{
                  "items":{
                    "type":"string"
                  },
                  "title":"Queries",
                  "type":"array"
                },
                "results":{
                  "anyOf":[
                    {
                      "items":{
                        "additionalProperties":true,
                        "properties":{
                          "attributes":{
                            "anyOf":[
                              {
                                "additionalProperties":{
                                  "anyOf":[
                                    {
                                      "type":"string"
                                    },
                                    {
                                      "type":"number"
                                    },
                                    {
                                      "type":"boolean"
                                    }
                                  ]
                                },
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Attributes"
                          },
                          "file_id":{
                            "title":"File Id",
                            "type":"string"
                          },
                          "filename":{
                            "title":"Filename",
                            "type":"string"
                          },
                          "score":{
                            "title":"Score",
                            "type":"number"
                          },
                          "text":{
                            "title":"Text",
                            "type":"string"
                          }
                        },
                        "title":"Result",
                        "type":"object"
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Results"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "searching",
                    "completed",
                    "incomplete",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"file_search_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "queries",
                "status",
                "type"
              ],
              "title":"ResponseFileSearchToolCallParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to a computer use tool.\n\nSee the\n[computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.",
              "properties":{
                "action":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "description":"A click action.",
                      "properties":{
                        "button":{
                          "enum":[
                            "left",
                            "right",
                            "wheel",
                            "back",
                            "forward"
                          ],
                          "title":"Button",
                          "type":"string"
                        },
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "type":{
                          "const":"click",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "button",
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionClick",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A double click action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "type":{
                          "const":"double_click",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "keys",
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionDoubleClick",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A drag action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "path":{
                          "items":{
                            "additionalProperties":true,
                            "description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.",
                            "properties":{
                              "x":{
                                "title":"X",
                                "type":"integer"
                              },
                              "y":{
                                "title":"Y",
                                "type":"integer"
                              }
                            },
                            "required":[
                              "x",
                              "y"
                            ],
                            "title":"ActionDragPath",
                            "type":"object"
                          },
                          "title":"Path",
                          "type":"array"
                        },
                        "type":{
                          "const":"drag",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "path",
                        "type"
                      ],
                      "title":"ActionDrag",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A collection of keypresses the model would like to perform.",
                      "properties":{
                        "keys":{
                          "items":{
                            "type":"string"
                          },
                          "title":"Keys",
                          "type":"array"
                        },
                        "type":{
                          "const":"keypress",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "keys",
                        "type"
                      ],
                      "title":"ActionKeypress",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A mouse move action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "type":{
                          "const":"move",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionMove",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A screenshot action.",
                      "properties":{
                        "type":{
                          "const":"screenshot",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionScreenshot",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A scroll action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "scroll_x":{
                          "title":"Scroll X",
                          "type":"integer"
                        },
                        "scroll_y":{
                          "title":"Scroll Y",
                          "type":"integer"
                        },
                        "type":{
                          "const":"scroll",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "scroll_x",
                        "scroll_y",
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionScroll",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"An action to type in text.",
                      "properties":{
                        "text":{
                          "title":"Text",
                          "type":"string"
                        },
                        "type":{
                          "const":"type",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "text",
                        "type"
                      ],
                      "title":"ActionType",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A wait action.",
                      "properties":{
                        "type":{
                          "const":"wait",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionWait",
                      "type":"object"
                    }
                  ],
                  "title":"Action"
                },
                "actions":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"A click action.",
                        "properties":{
                          "button":{
                            "enum":[
                              "left",
                              "right",
                              "wheel",
                              "back",
                              "forward"
                            ],
                            "title":"Button",
                            "type":"string"
                          },
                          "keys":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Keys"
                          },
                          "type":{
                            "const":"click",
                            "title":"Type",
                            "type":"string"
                          },
                          "x":{
                            "title":"X",
                            "type":"integer"
                          },
                          "y":{
                            "title":"Y",
                            "type":"integer"
                          }
                        },
                        "required":[
                          "button",
                          "type",
                          "x",
                          "y"
                        ],
                        "title":"Click",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A double click action.",
                        "properties":{
                          "keys":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Keys"
                          },
                          "type":{
                            "const":"double_click",
                            "title":"Type",
                            "type":"string"
                          },
                          "x":{
                            "title":"X",
                            "type":"integer"
                          },
                          "y":{
                            "title":"Y",
                            "type":"integer"
                          }
                        },
                        "required":[
                          "keys",
                          "type",
                          "x",
                          "y"
                        ],
                        "title":"DoubleClick",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A drag action.",
                        "properties":{
                          "keys":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Keys"
                          },
                          "path":{
                            "items":{
                              "additionalProperties":true,
                              "description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.",
                              "properties":{
                                "x":{
                                  "title":"X",
                                  "type":"integer"
                                },
                                "y":{
                                  "title":"Y",
                                  "type":"integer"
                                }
                              },
                              "required":[
                                "x",
                                "y"
                              ],
                              "title":"DragPath",
                              "type":"object"
                            },
                            "title":"Path",
                            "type":"array"
                          },
                          "type":{
                            "const":"drag",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "path",
                          "type"
                        ],
                        "title":"Drag",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A collection of keypresses the model would like to perform.",
                        "properties":{
                          "keys":{
                            "items":{
                              "type":"string"
                            },
                            "title":"Keys",
                            "type":"array"
                          },
                          "type":{
                            "const":"keypress",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "keys",
                          "type"
                        ],
                        "title":"Keypress",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A mouse move action.",
                        "properties":{
                          "keys":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Keys"
                          },
                          "type":{
                            "const":"move",
                            "title":"Type",
                            "type":"string"
                          },
                          "x":{
                            "title":"X",
                            "type":"integer"
                          },
                          "y":{
                            "title":"Y",
                            "type":"integer"
                          }
                        },
                        "required":[
                          "type",
                          "x",
                          "y"
                        ],
                        "title":"Move",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A screenshot action.",
                        "properties":{
                          "type":{
                            "const":"screenshot",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"Screenshot",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A scroll action.",
                        "properties":{
                          "keys":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Keys"
                          },
                          "scroll_x":{
                            "title":"Scroll X",
                            "type":"integer"
                          },
                          "scroll_y":{
                            "title":"Scroll Y",
                            "type":"integer"
                          },
                          "type":{
                            "const":"scroll",
                            "title":"Type",
                            "type":"string"
                          },
                          "x":{
                            "title":"X",
                            "type":"integer"
                          },
                          "y":{
                            "title":"Y",
                            "type":"integer"
                          }
                        },
                        "required":[
                          "scroll_x",
                          "scroll_y",
                          "type",
                          "x",
                          "y"
                        ],
                        "title":"Scroll",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"An action to type in text.",
                        "properties":{
                          "text":{
                            "title":"Text",
                            "type":"string"
                          },
                          "type":{
                            "const":"type",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "text",
                          "type"
                        ],
                        "title":"Type",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A wait action.",
                        "properties":{
                          "type":{
                            "const":"wait",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"Wait",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Actions",
                  "type":"array"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "pending_safety_checks":{
                  "items":{
                    "additionalProperties":true,
                    "description":"A pending safety check for the computer call.",
                    "properties":{
                      "code":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Code"
                      },
                      "id":{
                        "title":"Id",
                        "type":"string"
                      },
                      "message":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Message"
                      }
                    },
                    "required":[
                      "id"
                    ],
                    "title":"PendingSafetyCheck",
                    "type":"object"
                  },
                  "title":"Pending Safety Checks",
                  "type":"array"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"computer_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "call_id",
                "pending_safety_checks",
                "status",
                "type"
              ],
              "title":"ResponseComputerToolCallParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output of a computer tool call.",
              "properties":{
                "acknowledged_safety_checks":{
                  "anyOf":[
                    {
                      "items":{
                        "additionalProperties":true,
                        "description":"A pending safety check for the computer call.",
                        "properties":{
                          "code":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Code"
                          },
                          "id":{
                            "title":"Id",
                            "type":"string"
                          },
                          "message":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Message"
                          }
                        },
                        "required":[
                          "id"
                        ],
                        "title":"ComputerCallOutputAcknowledgedSafetyCheck",
                        "type":"object"
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Acknowledged Safety Checks"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "output":{
                  "additionalProperties":true,
                  "description":"A computer screenshot image used with the computer use tool.",
                  "properties":{
                    "file_id":{
                      "title":"File Id",
                      "type":"string"
                    },
                    "image_url":{
                      "title":"Image Url",
                      "type":"string"
                    },
                    "type":{
                      "const":"computer_screenshot",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "type"
                  ],
                  "title":"ResponseComputerToolCallOutputScreenshotParam",
                  "type":"object"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"computer_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "output",
                "type"
              ],
              "title":"ComputerCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The results of a web search tool call.\n\nSee the\n[web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.",
              "properties":{
                "action":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "description":"Action type \"search\" - Performs a web search query.",
                      "properties":{
                        "queries":{
                          "items":{
                            "type":"string"
                          },
                          "title":"Queries",
                          "type":"array"
                        },
                        "query":{
                          "title":"Query",
                          "type":"string"
                        },
                        "sources":{
                          "items":{
                            "additionalProperties":true,
                            "description":"A source used in the search.",
                            "properties":{
                              "type":{
                                "const":"url",
                                "title":"Type",
                                "type":"string"
                              },
                              "url":{
                                "title":"Url",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type",
                              "url"
                            ],
                            "title":"ActionSearchSource",
                            "type":"object"
                          },
                          "title":"Sources",
                          "type":"array"
                        },
                        "type":{
                          "const":"search",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionSearch",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Action type \"open_page\" - Opens a specific URL from search results.",
                      "properties":{
                        "type":{
                          "const":"open_page",
                          "title":"Type",
                          "type":"string"
                        },
                        "url":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Url"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionOpenPage",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Action type \"find_in_page\": Searches for a pattern within a loaded page.",
                      "properties":{
                        "pattern":{
                          "title":"Pattern",
                          "type":"string"
                        },
                        "type":{
                          "const":"find_in_page",
                          "title":"Type",
                          "type":"string"
                        },
                        "url":{
                          "title":"Url",
                          "type":"string"
                        }
                      },
                      "required":[
                        "pattern",
                        "type",
                        "url"
                      ],
                      "title":"ActionFind",
                      "type":"object"
                    }
                  ],
                  "title":"Action"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "searching",
                    "completed",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"web_search_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "action",
                "status",
                "type"
              ],
              "title":"ResponseFunctionWebSearchParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to run a function.\n\nSee the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.",
              "properties":{
                "arguments":{
                  "title":"Arguments",
                  "type":"string"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "namespace":{
                  "title":"Namespace",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"function_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "arguments",
                "call_id",
                "name",
                "type"
              ],
              "title":"ResponseFunctionToolCallParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output of a function tool call.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"A text input to the model.",
                            "properties":{
                              "text":{
                                "title":"Text",
                                "type":"string"
                              },
                              "type":{
                                "const":"input_text",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "text",
                              "type"
                            ],
                            "title":"ResponseInputTextContentParam",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision)",
                            "properties":{
                              "detail":{
                                "anyOf":[
                                  {
                                    "enum":[
                                      "low",
                                      "high",
                                      "auto",
                                      "original"
                                    ],
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Detail"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "image_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Image Url"
                              },
                              "type":{
                                "const":"input_image",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"ResponseInputImageContentParam",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A file input to the model.",
                            "properties":{
                              "detail":{
                                "enum":[
                                  "low",
                                  "high"
                                ],
                                "title":"Detail",
                                "type":"string"
                              },
                              "file_data":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Data"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "file_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Url"
                              },
                              "filename":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Filename"
                              },
                              "type":{
                                "const":"input_file",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"ResponseInputFileContentParam",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    }
                  ],
                  "title":"Output"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"function_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "output",
                "type"
              ],
              "title":"FunctionCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "arguments":{
                  "title":"Arguments"
                },
                "call_id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Call Id"
                },
                "execution":{
                  "enum":[
                    "server",
                    "client"
                  ],
                  "title":"Execution",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"tool_search_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "arguments",
                "type"
              ],
              "title":"ToolSearchCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "call_id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Call Id"
                },
                "execution":{
                  "enum":[
                    "server",
                    "client"
                  ],
                  "title":"Execution",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "tools":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"Defines a function in your own code the model can choose to call.\n\nLearn more about [function calling](https://platform.openai.com/docs/guides/function-calling).",
                        "properties":{
                          "defer_loading":{
                            "title":"Defer Loading",
                            "type":"boolean"
                          },
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "parameters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "strict":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Strict"
                          },
                          "type":{
                            "const":"function",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "parameters",
                          "strict",
                          "type"
                        ],
                        "title":"FunctionToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that searches for relevant content from uploaded files.\n\nLearn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                "properties":{
                                  "key":{
                                    "title":"Key",
                                    "type":"string"
                                  },
                                  "type":{
                                    "enum":[
                                      "eq",
                                      "ne",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "nin"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  },
                                  "value":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"number"
                                      },
                                      {
                                        "type":"boolean"
                                      },
                                      {
                                        "items":{
                                          "anyOf":[
                                            {
                                              "type":"string"
                                            },
                                            {
                                              "type":"number"
                                            }
                                          ]
                                        },
                                        "type":"array"
                                      }
                                    ],
                                    "title":"Value"
                                  }
                                },
                                "required":[
                                  "key",
                                  "type",
                                  "value"
                                ],
                                "title":"ComparisonFilter",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Combine multiple filters using `and` or `or`.",
                                "properties":{
                                  "filters":{
                                    "items":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                          "properties":{
                                            "key":{
                                              "title":"Key",
                                              "type":"string"
                                            },
                                            "type":{
                                              "enum":[
                                                "eq",
                                                "ne",
                                                "gt",
                                                "gte",
                                                "lt",
                                                "lte",
                                                "in",
                                                "nin"
                                              ],
                                              "title":"Type",
                                              "type":"string"
                                            },
                                            "value":{
                                              "anyOf":[
                                                {
                                                  "type":"string"
                                                },
                                                {
                                                  "type":"number"
                                                },
                                                {
                                                  "type":"boolean"
                                                },
                                                {
                                                  "items":{
                                                    "anyOf":[
                                                      {
                                                        "type":"string"
                                                      },
                                                      {
                                                        "type":"number"
                                                      }
                                                    ]
                                                  },
                                                  "type":"array"
                                                }
                                              ],
                                              "title":"Value"
                                            }
                                          },
                                          "required":[
                                            "key",
                                            "type",
                                            "value"
                                          ],
                                          "title":"ComparisonFilter",
                                          "type":"object"
                                        },
                                        {}
                                      ]
                                    },
                                    "title":"Filters",
                                    "type":"array"
                                  },
                                  "type":{
                                    "enum":[
                                      "and",
                                      "or"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "filters",
                                  "type"
                                ],
                                "title":"CompoundFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Filters"
                          },
                          "max_num_results":{
                            "title":"Max Num Results",
                            "type":"integer"
                          },
                          "ranking_options":{
                            "additionalProperties":true,
                            "description":"Ranking options for search.",
                            "properties":{
                              "hybrid_search":{
                                "additionalProperties":true,
                                "description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.",
                                "properties":{
                                  "embedding_weight":{
                                    "title":"Embedding Weight",
                                    "type":"number"
                                  },
                                  "text_weight":{
                                    "title":"Text Weight",
                                    "type":"number"
                                  }
                                },
                                "required":[
                                  "embedding_weight",
                                  "text_weight"
                                ],
                                "title":"RankingOptionsHybridSearch",
                                "type":"object"
                              },
                              "ranker":{
                                "enum":[
                                  "auto",
                                  "default-2024-11-15"
                                ],
                                "title":"Ranker",
                                "type":"string"
                              },
                              "score_threshold":{
                                "title":"Score Threshold",
                                "type":"number"
                              }
                            },
                            "title":"RankingOptions",
                            "type":"object"
                          },
                          "type":{
                            "const":"file_search",
                            "title":"Type",
                            "type":"string"
                          },
                          "vector_store_ids":{
                            "items":{
                              "type":"string"
                            },
                            "title":"Vector Store Ids",
                            "type":"array"
                          }
                        },
                        "required":[
                          "type",
                          "vector_store_ids"
                        ],
                        "title":"FileSearchToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "type":{
                            "const":"computer",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ComputerToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "display_height":{
                            "title":"Display Height",
                            "type":"integer"
                          },
                          "display_width":{
                            "title":"Display Width",
                            "type":"integer"
                          },
                          "environment":{
                            "enum":[
                              "windows",
                              "mac",
                              "linux",
                              "ubuntu",
                              "browser"
                            ],
                            "title":"Environment",
                            "type":"string"
                          },
                          "type":{
                            "const":"computer_use_preview",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "display_height",
                          "display_width",
                          "environment",
                          "type"
                        ],
                        "title":"ComputerUsePreviewToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Search the Internet for sources related to the prompt.\n\nLearn more about the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Filters for the search.",
                                "properties":{
                                  "allowed_domains":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Allowed Domains"
                                  }
                                },
                                "title":"Filters",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "search_context_size":{
                            "enum":[
                              "low",
                              "medium",
                              "high"
                            ],
                            "title":"Search Context Size",
                            "type":"string"
                          },
                          "type":{
                            "enum":[
                              "web_search",
                              "web_search_2025_08_26"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The approximate location of the user.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "const":"approximate",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).",
                        "properties":{
                          "allowed_tools":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A filter object to specify which tools are allowed.",
                                "properties":{
                                  "read_only":{
                                    "title":"Read Only",
                                    "type":"boolean"
                                  },
                                  "tool_names":{
                                    "items":{
                                      "type":"string"
                                    },
                                    "title":"Tool Names",
                                    "type":"array"
                                  }
                                },
                                "title":"McpAllowedToolsMcpToolFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Allowed Tools"
                          },
                          "authorization":{
                            "title":"Authorization",
                            "type":"string"
                          },
                          "connector_id":{
                            "enum":[
                              "connector_dropbox",
                              "connector_gmail",
                              "connector_googlecalendar",
                              "connector_googledrive",
                              "connector_microsoftteams",
                              "connector_outlookcalendar",
                              "connector_outlookemail",
                              "connector_sharepoint"
                            ],
                            "title":"Connector Id",
                            "type":"string"
                          },
                          "defer_loading":{
                            "title":"Defer Loading",
                            "type":"boolean"
                          },
                          "headers":{
                            "anyOf":[
                              {
                                "additionalProperties":{
                                  "type":"string"
                                },
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Headers"
                          },
                          "require_approval":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Specify which of the MCP server's tools require approval.\n\nCan be\n`always`, `never`, or a filter object associated with tools\nthat require approval.",
                                "properties":{
                                  "always":{
                                    "additionalProperties":true,
                                    "description":"A filter object to specify which tools are allowed.",
                                    "properties":{
                                      "read_only":{
                                        "title":"Read Only",
                                        "type":"boolean"
                                      },
                                      "tool_names":{
                                        "items":{
                                          "type":"string"
                                        },
                                        "title":"Tool Names",
                                        "type":"array"
                                      }
                                    },
                                    "title":"McpRequireApprovalMcpToolApprovalFilterAlways",
                                    "type":"object"
                                  },
                                  "never":{
                                    "additionalProperties":true,
                                    "description":"A filter object to specify which tools are allowed.",
                                    "properties":{
                                      "read_only":{
                                        "title":"Read Only",
                                        "type":"boolean"
                                      },
                                      "tool_names":{
                                        "items":{
                                          "type":"string"
                                        },
                                        "title":"Tool Names",
                                        "type":"array"
                                      }
                                    },
                                    "title":"McpRequireApprovalMcpToolApprovalFilterNever",
                                    "type":"object"
                                  }
                                },
                                "title":"McpRequireApprovalMcpToolApprovalFilter",
                                "type":"object"
                              },
                              {
                                "enum":[
                                  "always",
                                  "never"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Require Approval"
                          },
                          "server_description":{
                            "title":"Server Description",
                            "type":"string"
                          },
                          "server_label":{
                            "title":"Server Label",
                            "type":"string"
                          },
                          "server_url":{
                            "title":"Server Url",
                            "type":"string"
                          },
                          "tunnel_id":{
                            "title":"Tunnel Id",
                            "type":"string"
                          },
                          "type":{
                            "const":"mcp",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "server_label",
                          "type"
                        ],
                        "title":"Mcp",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that runs Python code to help generate a response to a prompt.",
                        "properties":{
                          "container":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Configuration for a code interpreter container.\n\nOptionally specify the IDs of the files to run the code on.",
                                "properties":{
                                  "file_ids":{
                                    "items":{
                                      "type":"string"
                                    },
                                    "title":"File Ids",
                                    "type":"array"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabledParam",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "items":{
                                              "additionalProperties":true,
                                              "properties":{
                                                "domain":{
                                                  "title":"Domain",
                                                  "type":"string"
                                                },
                                                "name":{
                                                  "title":"Name",
                                                  "type":"string"
                                                },
                                                "value":{
                                                  "title":"Value",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "domain",
                                                "name",
                                                "value"
                                              ],
                                              "title":"ContainerNetworkPolicyDomainSecretParam",
                                              "type":"object"
                                            },
                                            "title":"Domain Secrets",
                                            "type":"array"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlistParam",
                                        "type":"object"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "type":{
                                    "const":"auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"CodeInterpreterContainerCodeInterpreterToolAuto",
                                "type":"object"
                              }
                            ],
                            "title":"Container"
                          },
                          "type":{
                            "const":"code_interpreter",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "container",
                          "type"
                        ],
                        "title":"CodeInterpreter",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that generates images using the GPT image models.",
                        "properties":{
                          "action":{
                            "enum":[
                              "generate",
                              "edit",
                              "auto"
                            ],
                            "title":"Action",
                            "type":"string"
                          },
                          "background":{
                            "enum":[
                              "transparent",
                              "opaque",
                              "auto"
                            ],
                            "title":"Background",
                            "type":"string"
                          },
                          "input_fidelity":{
                            "anyOf":[
                              {
                                "enum":[
                                  "high",
                                  "low"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Input Fidelity"
                          },
                          "input_image_mask":{
                            "additionalProperties":true,
                            "description":"Optional mask for inpainting.\n\nContains `image_url`\n(string, optional) and `file_id` (string, optional).",
                            "properties":{
                              "file_id":{
                                "title":"File Id",
                                "type":"string"
                              },
                              "image_url":{
                                "title":"Image Url",
                                "type":"string"
                              }
                            },
                            "title":"ImageGenerationInputImageMask",
                            "type":"object"
                          },
                          "model":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "gpt-image-1",
                                  "gpt-image-1-mini",
                                  "gpt-image-2",
                                  "gpt-image-2-2026-04-21",
                                  "gpt-image-1.5",
                                  "chatgpt-image-latest"
                                ],
                                "type":"string"
                              }
                            ],
                            "title":"Model"
                          },
                          "moderation":{
                            "enum":[
                              "auto",
                              "low"
                            ],
                            "title":"Moderation",
                            "type":"string"
                          },
                          "output_compression":{
                            "title":"Output Compression",
                            "type":"integer"
                          },
                          "output_format":{
                            "enum":[
                              "png",
                              "webp",
                              "jpeg"
                            ],
                            "title":"Output Format",
                            "type":"string"
                          },
                          "partial_images":{
                            "title":"Partial Images",
                            "type":"integer"
                          },
                          "quality":{
                            "enum":[
                              "low",
                              "medium",
                              "high",
                              "auto"
                            ],
                            "title":"Quality",
                            "type":"string"
                          },
                          "size":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "1024x1024",
                                  "1024x1536",
                                  "1536x1024",
                                  "auto"
                                ],
                                "type":"string"
                              }
                            ],
                            "title":"Size"
                          },
                          "type":{
                            "const":"image_generation",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ImageGeneration",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands in a local environment.",
                        "properties":{
                          "type":{
                            "const":"local_shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"LocalShell",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands.",
                        "properties":{
                          "environment":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "file_ids":{
                                    "items":{
                                      "type":"string"
                                    },
                                    "title":"File Ids",
                                    "type":"array"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabledParam",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "items":{
                                              "additionalProperties":true,
                                              "properties":{
                                                "domain":{
                                                  "title":"Domain",
                                                  "type":"string"
                                                },
                                                "name":{
                                                  "title":"Name",
                                                  "type":"string"
                                                },
                                                "value":{
                                                  "title":"Value",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "domain",
                                                "name",
                                                "value"
                                              ],
                                              "title":"ContainerNetworkPolicyDomainSecretParam",
                                              "type":"object"
                                            },
                                            "title":"Domain Secrets",
                                            "type":"array"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlistParam",
                                        "type":"object"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "skills":{
                                    "items":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "properties":{
                                            "skill_id":{
                                              "title":"Skill Id",
                                              "type":"string"
                                            },
                                            "type":{
                                              "const":"skill_reference",
                                              "title":"Type",
                                              "type":"string"
                                            },
                                            "version":{
                                              "title":"Version",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "skill_id",
                                            "type"
                                          ],
                                          "title":"SkillReferenceParam",
                                          "type":"object"
                                        },
                                        {
                                          "additionalProperties":true,
                                          "properties":{
                                            "description":{
                                              "title":"Description",
                                              "type":"string"
                                            },
                                            "name":{
                                              "title":"Name",
                                              "type":"string"
                                            },
                                            "source":{
                                              "additionalProperties":true,
                                              "description":"Inline skill payload",
                                              "properties":{
                                                "data":{
                                                  "title":"Data",
                                                  "type":"string"
                                                },
                                                "media_type":{
                                                  "const":"application/zip",
                                                  "title":"Media Type",
                                                  "type":"string"
                                                },
                                                "type":{
                                                  "const":"base64",
                                                  "title":"Type",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "data",
                                                "media_type",
                                                "type"
                                              ],
                                              "title":"InlineSkillSourceParam",
                                              "type":"object"
                                            },
                                            "type":{
                                              "const":"inline",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "description",
                                            "name",
                                            "source",
                                            "type"
                                          ],
                                          "title":"InlineSkillParam",
                                          "type":"object"
                                        }
                                      ]
                                    },
                                    "title":"Skills",
                                    "type":"array"
                                  },
                                  "type":{
                                    "const":"container_auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"ContainerAutoParam",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "skills":{
                                    "items":{
                                      "additionalProperties":true,
                                      "properties":{
                                        "description":{
                                          "title":"Description",
                                          "type":"string"
                                        },
                                        "name":{
                                          "title":"Name",
                                          "type":"string"
                                        },
                                        "path":{
                                          "title":"Path",
                                          "type":"string"
                                        }
                                      },
                                      "required":[
                                        "description",
                                        "name",
                                        "path"
                                      ],
                                      "title":"LocalSkillParam",
                                      "type":"object"
                                    },
                                    "title":"Skills",
                                    "type":"array"
                                  },
                                  "type":{
                                    "const":"local",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"LocalEnvironmentParam",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "container_id":{
                                    "title":"Container Id",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"container_reference",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "container_id",
                                  "type"
                                ],
                                "title":"ContainerReferenceParam",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Environment"
                          },
                          "type":{
                            "const":"shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"FunctionShellToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                        "properties":{
                          "defer_loading":{
                            "title":"Defer Loading",
                            "type":"boolean"
                          },
                          "description":{
                            "title":"Description",
                            "type":"string"
                          },
                          "format":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Unconstrained free-form text.",
                                "properties":{
                                  "type":{
                                    "const":"text",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"Text",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A grammar defined by the user.",
                                "properties":{
                                  "definition":{
                                    "title":"Definition",
                                    "type":"string"
                                  },
                                  "syntax":{
                                    "enum":[
                                      "lark",
                                      "regex"
                                    ],
                                    "title":"Syntax",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"grammar",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "definition",
                                  "syntax",
                                  "type"
                                ],
                                "title":"Grammar",
                                "type":"object"
                              }
                            ],
                            "title":"Format"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "type":{
                            "const":"custom",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "type"
                        ],
                        "title":"CustomToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Groups function/custom tools under a shared namespace.",
                        "properties":{
                          "description":{
                            "title":"Description",
                            "type":"string"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "tools":{
                            "items":{
                              "anyOf":[
                                {
                                  "additionalProperties":true,
                                  "properties":{
                                    "defer_loading":{
                                      "title":"Defer Loading",
                                      "type":"boolean"
                                    },
                                    "description":{
                                      "anyOf":[
                                        {
                                          "type":"string"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Description"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "parameters":{
                                      "anyOf":[
                                        {},
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Parameters"
                                    },
                                    "strict":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Strict"
                                    },
                                    "type":{
                                      "const":"function",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"ToolFunction",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                                  "properties":{
                                    "defer_loading":{
                                      "title":"Defer Loading",
                                      "type":"boolean"
                                    },
                                    "description":{
                                      "title":"Description",
                                      "type":"string"
                                    },
                                    "format":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"Unconstrained free-form text.",
                                          "properties":{
                                            "type":{
                                              "const":"text",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "type"
                                          ],
                                          "title":"Text",
                                          "type":"object"
                                        },
                                        {
                                          "additionalProperties":true,
                                          "description":"A grammar defined by the user.",
                                          "properties":{
                                            "definition":{
                                              "title":"Definition",
                                              "type":"string"
                                            },
                                            "syntax":{
                                              "enum":[
                                                "lark",
                                                "regex"
                                              ],
                                              "title":"Syntax",
                                              "type":"string"
                                            },
                                            "type":{
                                              "const":"grammar",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "definition",
                                            "syntax",
                                            "type"
                                          ],
                                          "title":"Grammar",
                                          "type":"object"
                                        }
                                      ],
                                      "title":"Format"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "type":{
                                      "const":"custom",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"CustomToolParam",
                                  "type":"object"
                                }
                              ]
                            },
                            "title":"Tools",
                            "type":"array"
                          },
                          "type":{
                            "const":"namespace",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "description",
                          "name",
                          "tools",
                          "type"
                        ],
                        "title":"NamespaceToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Hosted or BYOT tool search configuration for deferred tools.",
                        "properties":{
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "execution":{
                            "enum":[
                              "server",
                              "client"
                            ],
                            "title":"Execution",
                            "type":"string"
                          },
                          "parameters":{
                            "anyOf":[
                              {},
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "type":{
                            "const":"tool_search",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ToolSearchToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"This tool searches the web for relevant results to use in a response.\n\nLearn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "search_content_types":{
                            "items":{
                              "enum":[
                                "text",
                                "image"
                              ],
                              "type":"string"
                            },
                            "title":"Search Content Types",
                            "type":"array"
                          },
                          "search_context_size":{
                            "enum":[
                              "low",
                              "medium",
                              "high"
                            ],
                            "title":"Search Context Size",
                            "type":"string"
                          },
                          "type":{
                            "enum":[
                              "web_search_preview",
                              "web_search_preview_2025_03_11"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The user's location.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "const":"approximate",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchPreviewToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Allows the assistant to create, delete, or update files using unified diffs.",
                        "properties":{
                          "type":{
                            "const":"apply_patch",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ApplyPatchToolParam",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Tools",
                  "type":"array"
                },
                "type":{
                  "const":"tool_search_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "tools",
                "type"
              ],
              "title":"ResponseToolSearchOutputItemParamParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "role":{
                  "const":"developer",
                  "title":"Role",
                  "type":"string"
                },
                "tools":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"Defines a function in your own code the model can choose to call.\n\nLearn more about [function calling](https://platform.openai.com/docs/guides/function-calling).",
                        "properties":{
                          "defer_loading":{
                            "title":"Defer Loading",
                            "type":"boolean"
                          },
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "parameters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "strict":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Strict"
                          },
                          "type":{
                            "const":"function",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "parameters",
                          "strict",
                          "type"
                        ],
                        "title":"FunctionToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that searches for relevant content from uploaded files.\n\nLearn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                "properties":{
                                  "key":{
                                    "title":"Key",
                                    "type":"string"
                                  },
                                  "type":{
                                    "enum":[
                                      "eq",
                                      "ne",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "nin"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  },
                                  "value":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"number"
                                      },
                                      {
                                        "type":"boolean"
                                      },
                                      {
                                        "items":{
                                          "anyOf":[
                                            {
                                              "type":"string"
                                            },
                                            {
                                              "type":"number"
                                            }
                                          ]
                                        },
                                        "type":"array"
                                      }
                                    ],
                                    "title":"Value"
                                  }
                                },
                                "required":[
                                  "key",
                                  "type",
                                  "value"
                                ],
                                "title":"ComparisonFilter",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Combine multiple filters using `and` or `or`.",
                                "properties":{
                                  "filters":{
                                    "items":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                          "properties":{
                                            "key":{
                                              "title":"Key",
                                              "type":"string"
                                            },
                                            "type":{
                                              "enum":[
                                                "eq",
                                                "ne",
                                                "gt",
                                                "gte",
                                                "lt",
                                                "lte",
                                                "in",
                                                "nin"
                                              ],
                                              "title":"Type",
                                              "type":"string"
                                            },
                                            "value":{
                                              "anyOf":[
                                                {
                                                  "type":"string"
                                                },
                                                {
                                                  "type":"number"
                                                },
                                                {
                                                  "type":"boolean"
                                                },
                                                {
                                                  "items":{
                                                    "anyOf":[
                                                      {
                                                        "type":"string"
                                                      },
                                                      {
                                                        "type":"number"
                                                      }
                                                    ]
                                                  },
                                                  "type":"array"
                                                }
                                              ],
                                              "title":"Value"
                                            }
                                          },
                                          "required":[
                                            "key",
                                            "type",
                                            "value"
                                          ],
                                          "title":"ComparisonFilter",
                                          "type":"object"
                                        },
                                        {}
                                      ]
                                    },
                                    "title":"Filters",
                                    "type":"array"
                                  },
                                  "type":{
                                    "enum":[
                                      "and",
                                      "or"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "filters",
                                  "type"
                                ],
                                "title":"CompoundFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Filters"
                          },
                          "max_num_results":{
                            "title":"Max Num Results",
                            "type":"integer"
                          },
                          "ranking_options":{
                            "additionalProperties":true,
                            "description":"Ranking options for search.",
                            "properties":{
                              "hybrid_search":{
                                "additionalProperties":true,
                                "description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.",
                                "properties":{
                                  "embedding_weight":{
                                    "title":"Embedding Weight",
                                    "type":"number"
                                  },
                                  "text_weight":{
                                    "title":"Text Weight",
                                    "type":"number"
                                  }
                                },
                                "required":[
                                  "embedding_weight",
                                  "text_weight"
                                ],
                                "title":"RankingOptionsHybridSearch",
                                "type":"object"
                              },
                              "ranker":{
                                "enum":[
                                  "auto",
                                  "default-2024-11-15"
                                ],
                                "title":"Ranker",
                                "type":"string"
                              },
                              "score_threshold":{
                                "title":"Score Threshold",
                                "type":"number"
                              }
                            },
                            "title":"RankingOptions",
                            "type":"object"
                          },
                          "type":{
                            "const":"file_search",
                            "title":"Type",
                            "type":"string"
                          },
                          "vector_store_ids":{
                            "items":{
                              "type":"string"
                            },
                            "title":"Vector Store Ids",
                            "type":"array"
                          }
                        },
                        "required":[
                          "type",
                          "vector_store_ids"
                        ],
                        "title":"FileSearchToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "type":{
                            "const":"computer",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ComputerToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "display_height":{
                            "title":"Display Height",
                            "type":"integer"
                          },
                          "display_width":{
                            "title":"Display Width",
                            "type":"integer"
                          },
                          "environment":{
                            "enum":[
                              "windows",
                              "mac",
                              "linux",
                              "ubuntu",
                              "browser"
                            ],
                            "title":"Environment",
                            "type":"string"
                          },
                          "type":{
                            "const":"computer_use_preview",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "display_height",
                          "display_width",
                          "environment",
                          "type"
                        ],
                        "title":"ComputerUsePreviewToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Search the Internet for sources related to the prompt.\n\nLearn more about the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Filters for the search.",
                                "properties":{
                                  "allowed_domains":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Allowed Domains"
                                  }
                                },
                                "title":"Filters",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "search_context_size":{
                            "enum":[
                              "low",
                              "medium",
                              "high"
                            ],
                            "title":"Search Context Size",
                            "type":"string"
                          },
                          "type":{
                            "enum":[
                              "web_search",
                              "web_search_2025_08_26"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The approximate location of the user.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "const":"approximate",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).",
                        "properties":{
                          "allowed_tools":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A filter object to specify which tools are allowed.",
                                "properties":{
                                  "read_only":{
                                    "title":"Read Only",
                                    "type":"boolean"
                                  },
                                  "tool_names":{
                                    "items":{
                                      "type":"string"
                                    },
                                    "title":"Tool Names",
                                    "type":"array"
                                  }
                                },
                                "title":"McpAllowedToolsMcpToolFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Allowed Tools"
                          },
                          "authorization":{
                            "title":"Authorization",
                            "type":"string"
                          },
                          "connector_id":{
                            "enum":[
                              "connector_dropbox",
                              "connector_gmail",
                              "connector_googlecalendar",
                              "connector_googledrive",
                              "connector_microsoftteams",
                              "connector_outlookcalendar",
                              "connector_outlookemail",
                              "connector_sharepoint"
                            ],
                            "title":"Connector Id",
                            "type":"string"
                          },
                          "defer_loading":{
                            "title":"Defer Loading",
                            "type":"boolean"
                          },
                          "headers":{
                            "anyOf":[
                              {
                                "additionalProperties":{
                                  "type":"string"
                                },
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Headers"
                          },
                          "require_approval":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Specify which of the MCP server's tools require approval.\n\nCan be\n`always`, `never`, or a filter object associated with tools\nthat require approval.",
                                "properties":{
                                  "always":{
                                    "additionalProperties":true,
                                    "description":"A filter object to specify which tools are allowed.",
                                    "properties":{
                                      "read_only":{
                                        "title":"Read Only",
                                        "type":"boolean"
                                      },
                                      "tool_names":{
                                        "items":{
                                          "type":"string"
                                        },
                                        "title":"Tool Names",
                                        "type":"array"
                                      }
                                    },
                                    "title":"McpRequireApprovalMcpToolApprovalFilterAlways",
                                    "type":"object"
                                  },
                                  "never":{
                                    "additionalProperties":true,
                                    "description":"A filter object to specify which tools are allowed.",
                                    "properties":{
                                      "read_only":{
                                        "title":"Read Only",
                                        "type":"boolean"
                                      },
                                      "tool_names":{
                                        "items":{
                                          "type":"string"
                                        },
                                        "title":"Tool Names",
                                        "type":"array"
                                      }
                                    },
                                    "title":"McpRequireApprovalMcpToolApprovalFilterNever",
                                    "type":"object"
                                  }
                                },
                                "title":"McpRequireApprovalMcpToolApprovalFilter",
                                "type":"object"
                              },
                              {
                                "enum":[
                                  "always",
                                  "never"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Require Approval"
                          },
                          "server_description":{
                            "title":"Server Description",
                            "type":"string"
                          },
                          "server_label":{
                            "title":"Server Label",
                            "type":"string"
                          },
                          "server_url":{
                            "title":"Server Url",
                            "type":"string"
                          },
                          "tunnel_id":{
                            "title":"Tunnel Id",
                            "type":"string"
                          },
                          "type":{
                            "const":"mcp",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "server_label",
                          "type"
                        ],
                        "title":"Mcp",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that runs Python code to help generate a response to a prompt.",
                        "properties":{
                          "container":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Configuration for a code interpreter container.\n\nOptionally specify the IDs of the files to run the code on.",
                                "properties":{
                                  "file_ids":{
                                    "items":{
                                      "type":"string"
                                    },
                                    "title":"File Ids",
                                    "type":"array"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabledParam",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "items":{
                                              "additionalProperties":true,
                                              "properties":{
                                                "domain":{
                                                  "title":"Domain",
                                                  "type":"string"
                                                },
                                                "name":{
                                                  "title":"Name",
                                                  "type":"string"
                                                },
                                                "value":{
                                                  "title":"Value",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "domain",
                                                "name",
                                                "value"
                                              ],
                                              "title":"ContainerNetworkPolicyDomainSecretParam",
                                              "type":"object"
                                            },
                                            "title":"Domain Secrets",
                                            "type":"array"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlistParam",
                                        "type":"object"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "type":{
                                    "const":"auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"CodeInterpreterContainerCodeInterpreterToolAuto",
                                "type":"object"
                              }
                            ],
                            "title":"Container"
                          },
                          "type":{
                            "const":"code_interpreter",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "container",
                          "type"
                        ],
                        "title":"CodeInterpreter",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that generates images using the GPT image models.",
                        "properties":{
                          "action":{
                            "enum":[
                              "generate",
                              "edit",
                              "auto"
                            ],
                            "title":"Action",
                            "type":"string"
                          },
                          "background":{
                            "enum":[
                              "transparent",
                              "opaque",
                              "auto"
                            ],
                            "title":"Background",
                            "type":"string"
                          },
                          "input_fidelity":{
                            "anyOf":[
                              {
                                "enum":[
                                  "high",
                                  "low"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Input Fidelity"
                          },
                          "input_image_mask":{
                            "additionalProperties":true,
                            "description":"Optional mask for inpainting.\n\nContains `image_url`\n(string, optional) and `file_id` (string, optional).",
                            "properties":{
                              "file_id":{
                                "title":"File Id",
                                "type":"string"
                              },
                              "image_url":{
                                "title":"Image Url",
                                "type":"string"
                              }
                            },
                            "title":"ImageGenerationInputImageMask",
                            "type":"object"
                          },
                          "model":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "gpt-image-1",
                                  "gpt-image-1-mini",
                                  "gpt-image-2",
                                  "gpt-image-2-2026-04-21",
                                  "gpt-image-1.5",
                                  "chatgpt-image-latest"
                                ],
                                "type":"string"
                              }
                            ],
                            "title":"Model"
                          },
                          "moderation":{
                            "enum":[
                              "auto",
                              "low"
                            ],
                            "title":"Moderation",
                            "type":"string"
                          },
                          "output_compression":{
                            "title":"Output Compression",
                            "type":"integer"
                          },
                          "output_format":{
                            "enum":[
                              "png",
                              "webp",
                              "jpeg"
                            ],
                            "title":"Output Format",
                            "type":"string"
                          },
                          "partial_images":{
                            "title":"Partial Images",
                            "type":"integer"
                          },
                          "quality":{
                            "enum":[
                              "low",
                              "medium",
                              "high",
                              "auto"
                            ],
                            "title":"Quality",
                            "type":"string"
                          },
                          "size":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "1024x1024",
                                  "1024x1536",
                                  "1536x1024",
                                  "auto"
                                ],
                                "type":"string"
                              }
                            ],
                            "title":"Size"
                          },
                          "type":{
                            "const":"image_generation",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ImageGeneration",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands in a local environment.",
                        "properties":{
                          "type":{
                            "const":"local_shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"LocalShell",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands.",
                        "properties":{
                          "environment":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "file_ids":{
                                    "items":{
                                      "type":"string"
                                    },
                                    "title":"File Ids",
                                    "type":"array"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabledParam",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "items":{
                                              "additionalProperties":true,
                                              "properties":{
                                                "domain":{
                                                  "title":"Domain",
                                                  "type":"string"
                                                },
                                                "name":{
                                                  "title":"Name",
                                                  "type":"string"
                                                },
                                                "value":{
                                                  "title":"Value",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "domain",
                                                "name",
                                                "value"
                                              ],
                                              "title":"ContainerNetworkPolicyDomainSecretParam",
                                              "type":"object"
                                            },
                                            "title":"Domain Secrets",
                                            "type":"array"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlistParam",
                                        "type":"object"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "skills":{
                                    "items":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "properties":{
                                            "skill_id":{
                                              "title":"Skill Id",
                                              "type":"string"
                                            },
                                            "type":{
                                              "const":"skill_reference",
                                              "title":"Type",
                                              "type":"string"
                                            },
                                            "version":{
                                              "title":"Version",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "skill_id",
                                            "type"
                                          ],
                                          "title":"SkillReferenceParam",
                                          "type":"object"
                                        },
                                        {
                                          "additionalProperties":true,
                                          "properties":{
                                            "description":{
                                              "title":"Description",
                                              "type":"string"
                                            },
                                            "name":{
                                              "title":"Name",
                                              "type":"string"
                                            },
                                            "source":{
                                              "additionalProperties":true,
                                              "description":"Inline skill payload",
                                              "properties":{
                                                "data":{
                                                  "title":"Data",
                                                  "type":"string"
                                                },
                                                "media_type":{
                                                  "const":"application/zip",
                                                  "title":"Media Type",
                                                  "type":"string"
                                                },
                                                "type":{
                                                  "const":"base64",
                                                  "title":"Type",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "data",
                                                "media_type",
                                                "type"
                                              ],
                                              "title":"InlineSkillSourceParam",
                                              "type":"object"
                                            },
                                            "type":{
                                              "const":"inline",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "description",
                                            "name",
                                            "source",
                                            "type"
                                          ],
                                          "title":"InlineSkillParam",
                                          "type":"object"
                                        }
                                      ]
                                    },
                                    "title":"Skills",
                                    "type":"array"
                                  },
                                  "type":{
                                    "const":"container_auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"ContainerAutoParam",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "skills":{
                                    "items":{
                                      "additionalProperties":true,
                                      "properties":{
                                        "description":{
                                          "title":"Description",
                                          "type":"string"
                                        },
                                        "name":{
                                          "title":"Name",
                                          "type":"string"
                                        },
                                        "path":{
                                          "title":"Path",
                                          "type":"string"
                                        }
                                      },
                                      "required":[
                                        "description",
                                        "name",
                                        "path"
                                      ],
                                      "title":"LocalSkillParam",
                                      "type":"object"
                                    },
                                    "title":"Skills",
                                    "type":"array"
                                  },
                                  "type":{
                                    "const":"local",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"LocalEnvironmentParam",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "container_id":{
                                    "title":"Container Id",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"container_reference",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "container_id",
                                  "type"
                                ],
                                "title":"ContainerReferenceParam",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Environment"
                          },
                          "type":{
                            "const":"shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"FunctionShellToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                        "properties":{
                          "defer_loading":{
                            "title":"Defer Loading",
                            "type":"boolean"
                          },
                          "description":{
                            "title":"Description",
                            "type":"string"
                          },
                          "format":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Unconstrained free-form text.",
                                "properties":{
                                  "type":{
                                    "const":"text",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"Text",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A grammar defined by the user.",
                                "properties":{
                                  "definition":{
                                    "title":"Definition",
                                    "type":"string"
                                  },
                                  "syntax":{
                                    "enum":[
                                      "lark",
                                      "regex"
                                    ],
                                    "title":"Syntax",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"grammar",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "definition",
                                  "syntax",
                                  "type"
                                ],
                                "title":"Grammar",
                                "type":"object"
                              }
                            ],
                            "title":"Format"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "type":{
                            "const":"custom",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "type"
                        ],
                        "title":"CustomToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Groups function/custom tools under a shared namespace.",
                        "properties":{
                          "description":{
                            "title":"Description",
                            "type":"string"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "tools":{
                            "items":{
                              "anyOf":[
                                {
                                  "additionalProperties":true,
                                  "properties":{
                                    "defer_loading":{
                                      "title":"Defer Loading",
                                      "type":"boolean"
                                    },
                                    "description":{
                                      "anyOf":[
                                        {
                                          "type":"string"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Description"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "parameters":{
                                      "anyOf":[
                                        {},
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Parameters"
                                    },
                                    "strict":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Strict"
                                    },
                                    "type":{
                                      "const":"function",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"ToolFunction",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                                  "properties":{
                                    "defer_loading":{
                                      "title":"Defer Loading",
                                      "type":"boolean"
                                    },
                                    "description":{
                                      "title":"Description",
                                      "type":"string"
                                    },
                                    "format":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"Unconstrained free-form text.",
                                          "properties":{
                                            "type":{
                                              "const":"text",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "type"
                                          ],
                                          "title":"Text",
                                          "type":"object"
                                        },
                                        {
                                          "additionalProperties":true,
                                          "description":"A grammar defined by the user.",
                                          "properties":{
                                            "definition":{
                                              "title":"Definition",
                                              "type":"string"
                                            },
                                            "syntax":{
                                              "enum":[
                                                "lark",
                                                "regex"
                                              ],
                                              "title":"Syntax",
                                              "type":"string"
                                            },
                                            "type":{
                                              "const":"grammar",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "definition",
                                            "syntax",
                                            "type"
                                          ],
                                          "title":"Grammar",
                                          "type":"object"
                                        }
                                      ],
                                      "title":"Format"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "type":{
                                      "const":"custom",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"CustomToolParam",
                                  "type":"object"
                                }
                              ]
                            },
                            "title":"Tools",
                            "type":"array"
                          },
                          "type":{
                            "const":"namespace",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "description",
                          "name",
                          "tools",
                          "type"
                        ],
                        "title":"NamespaceToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Hosted or BYOT tool search configuration for deferred tools.",
                        "properties":{
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "execution":{
                            "enum":[
                              "server",
                              "client"
                            ],
                            "title":"Execution",
                            "type":"string"
                          },
                          "parameters":{
                            "anyOf":[
                              {},
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "type":{
                            "const":"tool_search",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ToolSearchToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"This tool searches the web for relevant results to use in a response.\n\nLearn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "search_content_types":{
                            "items":{
                              "enum":[
                                "text",
                                "image"
                              ],
                              "type":"string"
                            },
                            "title":"Search Content Types",
                            "type":"array"
                          },
                          "search_context_size":{
                            "enum":[
                              "low",
                              "medium",
                              "high"
                            ],
                            "title":"Search Context Size",
                            "type":"string"
                          },
                          "type":{
                            "enum":[
                              "web_search_preview",
                              "web_search_preview_2025_03_11"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The user's location.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "const":"approximate",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchPreviewToolParam",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Allows the assistant to create, delete, or update files using unified diffs.",
                        "properties":{
                          "type":{
                            "const":"apply_patch",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ApplyPatchToolParam",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Tools",
                  "type":"array"
                },
                "type":{
                  "const":"additional_tools",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "role",
                "tools",
                "type"
              ],
              "title":"AdditionalTools",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state).",
              "properties":{
                "content":{
                  "items":{
                    "additionalProperties":true,
                    "description":"Reasoning text from the model.",
                    "properties":{
                      "text":{
                        "title":"Text",
                        "type":"string"
                      },
                      "type":{
                        "const":"reasoning_text",
                        "title":"Type",
                        "type":"string"
                      }
                    },
                    "required":[
                      "text",
                      "type"
                    ],
                    "title":"Content",
                    "type":"object"
                  },
                  "title":"Content",
                  "type":"array"
                },
                "encrypted_content":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Encrypted Content"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "summary":{
                  "items":{
                    "additionalProperties":true,
                    "description":"A summary text from the model.",
                    "properties":{
                      "text":{
                        "title":"Text",
                        "type":"string"
                      },
                      "type":{
                        "const":"summary_text",
                        "title":"Type",
                        "type":"string"
                      }
                    },
                    "required":[
                      "text",
                      "type"
                    ],
                    "title":"Summary",
                    "type":"object"
                  },
                  "title":"Summary",
                  "type":"array"
                },
                "type":{
                  "const":"reasoning",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "summary",
                "type"
              ],
              "title":"ResponseReasoningItemParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).",
              "properties":{
                "encrypted_content":{
                  "title":"Encrypted Content",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "type":{
                  "const":"compaction",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "encrypted_content",
                "type"
              ],
              "title":"ResponseCompactionItemParamParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"An image generation request made by the model.",
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "result":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Result"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "generating",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"image_generation_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "result",
                "status",
                "type"
              ],
              "title":"ImageGenerationCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to run code.",
              "properties":{
                "code":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Code"
                },
                "container_id":{
                  "title":"Container Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "outputs":{
                  "anyOf":[
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"The logs output from the code interpreter.",
                            "properties":{
                              "logs":{
                                "title":"Logs",
                                "type":"string"
                              },
                              "type":{
                                "const":"logs",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "logs",
                              "type"
                            ],
                            "title":"OutputLogs",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"The image output from the code interpreter.",
                            "properties":{
                              "type":{
                                "const":"image",
                                "title":"Type",
                                "type":"string"
                              },
                              "url":{
                                "title":"Url",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type",
                              "url"
                            ],
                            "title":"OutputImage",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Outputs"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete",
                    "interpreting",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"code_interpreter_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "code",
                "container_id",
                "outputs",
                "status",
                "type"
              ],
              "title":"ResponseCodeInterpreterToolCallParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to run a command on the local shell.",
              "properties":{
                "action":{
                  "additionalProperties":true,
                  "description":"Execute a shell command on the server.",
                  "properties":{
                    "command":{
                      "items":{
                        "type":"string"
                      },
                      "title":"Command",
                      "type":"array"
                    },
                    "env":{
                      "additionalProperties":{
                        "type":"string"
                      },
                      "title":"Env",
                      "type":"object"
                    },
                    "timeout_ms":{
                      "anyOf":[
                        {
                          "type":"integer"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Timeout Ms"
                    },
                    "type":{
                      "const":"exec",
                      "title":"Type",
                      "type":"string"
                    },
                    "user":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"User"
                    },
                    "working_directory":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Working Directory"
                    }
                  },
                  "required":[
                    "command",
                    "env",
                    "type"
                  ],
                  "title":"LocalShellCallAction",
                  "type":"object"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"local_shell_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "action",
                "call_id",
                "status",
                "type"
              ],
              "title":"LocalShellCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output of a local shell tool call.",
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "output":{
                  "title":"Output",
                  "type":"string"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"local_shell_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "output",
                "type"
              ],
              "title":"LocalShellCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool representing a request to execute one or more shell commands.",
              "properties":{
                "action":{
                  "additionalProperties":true,
                  "description":"The shell commands and limits that describe how to run the tool call.",
                  "properties":{
                    "commands":{
                      "items":{
                        "type":"string"
                      },
                      "title":"Commands",
                      "type":"array"
                    },
                    "max_output_length":{
                      "anyOf":[
                        {
                          "type":"integer"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Max Output Length"
                    },
                    "timeout_ms":{
                      "anyOf":[
                        {
                          "type":"integer"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Timeout Ms"
                    }
                  },
                  "required":[
                    "commands"
                  ],
                  "title":"ShellCallAction",
                  "type":"object"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "environment":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "properties":{
                        "skills":{
                          "items":{
                            "additionalProperties":true,
                            "properties":{
                              "description":{
                                "title":"Description",
                                "type":"string"
                              },
                              "name":{
                                "title":"Name",
                                "type":"string"
                              },
                              "path":{
                                "title":"Path",
                                "type":"string"
                              }
                            },
                            "required":[
                              "description",
                              "name",
                              "path"
                            ],
                            "title":"LocalSkillParam",
                            "type":"object"
                          },
                          "title":"Skills",
                          "type":"array"
                        },
                        "type":{
                          "const":"local",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"LocalEnvironmentParam",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "properties":{
                        "container_id":{
                          "title":"Container Id",
                          "type":"string"
                        },
                        "type":{
                          "const":"container_reference",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "container_id",
                        "type"
                      ],
                      "title":"ContainerReferenceParam",
                      "type":"object"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Environment"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"shell_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "action",
                "call_id",
                "type"
              ],
              "title":"ShellCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The streamed output items emitted by a shell tool call.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "max_output_length":{
                  "anyOf":[
                    {
                      "type":"integer"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Max Output Length"
                },
                "output":{
                  "items":{
                    "additionalProperties":true,
                    "description":"Captured stdout and stderr for a portion of a shell tool call output.",
                    "properties":{
                      "outcome":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"Indicates that the shell call exceeded its configured time limit.",
                            "properties":{
                              "type":{
                                "const":"timeout",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"OutcomeTimeout",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"Indicates that the shell commands finished and returned an exit code.",
                            "properties":{
                              "exit_code":{
                                "title":"Exit Code",
                                "type":"integer"
                              },
                              "type":{
                                "const":"exit",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "exit_code",
                              "type"
                            ],
                            "title":"OutcomeExit",
                            "type":"object"
                          }
                        ],
                        "title":"Outcome"
                      },
                      "stderr":{
                        "title":"Stderr",
                        "type":"string"
                      },
                      "stdout":{
                        "title":"Stdout",
                        "type":"string"
                      }
                    },
                    "required":[
                      "outcome",
                      "stderr",
                      "stdout"
                    ],
                    "title":"ResponseFunctionShellCallOutputContentParam",
                    "type":"object"
                  },
                  "title":"Output",
                  "type":"array"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"shell_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "output",
                "type"
              ],
              "title":"ShellCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call representing a request to create, delete, or update files using diff patches.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "operation":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "description":"Instruction for creating a new file via the apply_patch tool.",
                      "properties":{
                        "diff":{
                          "title":"Diff",
                          "type":"string"
                        },
                        "path":{
                          "title":"Path",
                          "type":"string"
                        },
                        "type":{
                          "const":"create_file",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "diff",
                        "path",
                        "type"
                      ],
                      "title":"ApplyPatchCallOperationCreateFile",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Instruction for deleting an existing file via the apply_patch tool.",
                      "properties":{
                        "path":{
                          "title":"Path",
                          "type":"string"
                        },
                        "type":{
                          "const":"delete_file",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "path",
                        "type"
                      ],
                      "title":"ApplyPatchCallOperationDeleteFile",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Instruction for updating an existing file via the apply_patch tool.",
                      "properties":{
                        "diff":{
                          "title":"Diff",
                          "type":"string"
                        },
                        "path":{
                          "title":"Path",
                          "type":"string"
                        },
                        "type":{
                          "const":"update_file",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "diff",
                        "path",
                        "type"
                      ],
                      "title":"ApplyPatchCallOperationUpdateFile",
                      "type":"object"
                    }
                  ],
                  "title":"Operation"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"apply_patch_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "operation",
                "status",
                "type"
              ],
              "title":"ApplyPatchCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The streamed output emitted by an apply patch tool call.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Output"
                },
                "status":{
                  "enum":[
                    "completed",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"apply_patch_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "status",
                "type"
              ],
              "title":"ApplyPatchCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A list of tools available on an MCP server.",
              "properties":{
                "error":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Error"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "server_label":{
                  "title":"Server Label",
                  "type":"string"
                },
                "tools":{
                  "items":{
                    "additionalProperties":true,
                    "description":"A tool available on an MCP server.",
                    "properties":{
                      "annotations":{
                        "anyOf":[
                          {},
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Annotations"
                      },
                      "description":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Description"
                      },
                      "input_schema":{
                        "title":"Input Schema"
                      },
                      "name":{
                        "title":"Name",
                        "type":"string"
                      }
                    },
                    "required":[
                      "input_schema",
                      "name"
                    ],
                    "title":"McpListToolsTool",
                    "type":"object"
                  },
                  "title":"Tools",
                  "type":"array"
                },
                "type":{
                  "const":"mcp_list_tools",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "server_label",
                "tools",
                "type"
              ],
              "title":"McpListTools",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "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",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "arguments",
                "name",
                "server_label",
                "type"
              ],
              "title":"McpApprovalRequest",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A response to an MCP approval request.",
              "properties":{
                "approval_request_id":{
                  "title":"Approval Request Id",
                  "type":"string"
                },
                "approve":{
                  "title":"Approve",
                  "type":"boolean"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "reason":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Reason"
                },
                "type":{
                  "const":"mcp_approval_response",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "approval_request_id",
                "approve",
                "type"
              ],
              "title":"McpApprovalResponse",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"An invocation of a tool on an MCP server.",
              "properties":{
                "approval_request_id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Approval Request Id"
                },
                "arguments":{
                  "title":"Arguments",
                  "type":"string"
                },
                "error":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Error"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Output"
                },
                "server_label":{
                  "title":"Server Label",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete",
                    "calling",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"mcp_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "arguments",
                "name",
                "server_label",
                "type"
              ],
              "title":"McpCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output of a custom tool call from your code, being sent back to the model.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"A text input to the model.",
                            "properties":{
                              "text":{
                                "title":"Text",
                                "type":"string"
                              },
                              "type":{
                                "const":"input_text",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "text",
                              "type"
                            ],
                            "title":"ResponseInputTextParam",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision).",
                            "properties":{
                              "detail":{
                                "enum":[
                                  "low",
                                  "high",
                                  "auto",
                                  "original"
                                ],
                                "title":"Detail",
                                "type":"string"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "image_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Image Url"
                              },
                              "type":{
                                "const":"input_image",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "detail",
                              "type"
                            ],
                            "title":"ResponseInputImageParam",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A file input to the model.",
                            "properties":{
                              "detail":{
                                "enum":[
                                  "low",
                                  "high"
                                ],
                                "title":"Detail",
                                "type":"string"
                              },
                              "file_data":{
                                "title":"File Data",
                                "type":"string"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "file_url":{
                                "title":"File Url",
                                "type":"string"
                              },
                              "filename":{
                                "title":"Filename",
                                "type":"string"
                              },
                              "type":{
                                "const":"input_file",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"ResponseInputFileParam",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    }
                  ],
                  "title":"Output"
                },
                "type":{
                  "const":"custom_tool_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "output",
                "type"
              ],
              "title":"ResponseCustomToolCallOutputParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A call to a custom tool created by the model.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "input":{
                  "title":"Input",
                  "type":"string"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "namespace":{
                  "title":"Namespace",
                  "type":"string"
                },
                "type":{
                  "const":"custom_tool_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "input",
                "name",
                "type"
              ],
              "title":"ResponseCustomToolCallParam",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"Compacts the current context. Must be the final input item.",
              "properties":{
                "type":{
                  "const":"compaction_trigger",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "type"
              ],
              "title":"CompactionTrigger",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"An internal identifier for an item to reference.",
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "type":{
                  "anyOf":[
                    {
                      "const":"item_reference",
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Type"
                }
              },
              "required":[
                "id"
              ],
              "title":"ItemReference",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"An output message from the model.",
              "properties":{
                "content":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"A text output from the model.",
                        "properties":{
                          "annotations":{
                            "items":{
                              "anyOf":[
                                {
                                  "additionalProperties":true,
                                  "description":"A citation to a file.",
                                  "properties":{
                                    "file_id":{
                                      "title":"File Id",
                                      "type":"string"
                                    },
                                    "filename":{
                                      "title":"Filename",
                                      "type":"string"
                                    },
                                    "index":{
                                      "title":"Index",
                                      "type":"integer"
                                    },
                                    "type":{
                                      "const":"file_citation",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "file_id",
                                    "filename",
                                    "index",
                                    "type"
                                  ],
                                  "title":"AnnotationFileCitation",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A citation for a web resource used to generate a model response.",
                                  "properties":{
                                    "end_index":{
                                      "title":"End Index",
                                      "type":"integer"
                                    },
                                    "start_index":{
                                      "title":"Start Index",
                                      "type":"integer"
                                    },
                                    "title":{
                                      "title":"Title",
                                      "type":"string"
                                    },
                                    "type":{
                                      "const":"url_citation",
                                      "title":"Type",
                                      "type":"string"
                                    },
                                    "url":{
                                      "title":"Url",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "end_index",
                                    "start_index",
                                    "title",
                                    "type",
                                    "url"
                                  ],
                                  "title":"AnnotationURLCitation",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A citation for a container file used to generate a model response.",
                                  "properties":{
                                    "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"
                                    },
                                    "type":{
                                      "const":"container_file_citation",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "container_id",
                                    "end_index",
                                    "file_id",
                                    "filename",
                                    "start_index",
                                    "type"
                                  ],
                                  "title":"AnnotationContainerFileCitation",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A path to a file.",
                                  "properties":{
                                    "file_id":{
                                      "title":"File Id",
                                      "type":"string"
                                    },
                                    "index":{
                                      "title":"Index",
                                      "type":"integer"
                                    },
                                    "type":{
                                      "const":"file_path",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "file_id",
                                    "index",
                                    "type"
                                  ],
                                  "title":"AnnotationFilePath",
                                  "type":"object"
                                }
                              ]
                            },
                            "title":"Annotations",
                            "type":"array"
                          },
                          "logprobs":{
                            "anyOf":[
                              {
                                "items":{
                                  "additionalProperties":true,
                                  "description":"The log probability of a token.",
                                  "properties":{
                                    "bytes":{
                                      "items":{
                                        "type":"integer"
                                      },
                                      "title":"Bytes",
                                      "type":"array"
                                    },
                                    "logprob":{
                                      "title":"Logprob",
                                      "type":"number"
                                    },
                                    "token":{
                                      "title":"Token",
                                      "type":"string"
                                    },
                                    "top_logprobs":{
                                      "items":{
                                        "additionalProperties":true,
                                        "description":"The top log probability of a token.",
                                        "properties":{
                                          "bytes":{
                                            "items":{
                                              "type":"integer"
                                            },
                                            "title":"Bytes",
                                            "type":"array"
                                          },
                                          "logprob":{
                                            "title":"Logprob",
                                            "type":"number"
                                          },
                                          "token":{
                                            "title":"Token",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "token",
                                          "bytes",
                                          "logprob"
                                        ],
                                        "title":"LogprobTopLogprob",
                                        "type":"object"
                                      },
                                      "title":"Top Logprobs",
                                      "type":"array"
                                    }
                                  },
                                  "required":[
                                    "token",
                                    "bytes",
                                    "logprob",
                                    "top_logprobs"
                                  ],
                                  "title":"Logprob",
                                  "type":"object"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Logprobs"
                          },
                          "text":{
                            "title":"Text",
                            "type":"string"
                          },
                          "type":{
                            "const":"output_text",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "annotations",
                          "text",
                          "type"
                        ],
                        "title":"ResponseOutputText",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A refusal from the model.",
                        "properties":{
                          "refusal":{
                            "title":"Refusal",
                            "type":"string"
                          },
                          "type":{
                            "const":"refusal",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "refusal",
                          "type"
                        ],
                        "title":"ResponseOutputRefusal",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Content",
                  "type":"array"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "phase":{
                  "anyOf":[
                    {
                      "enum":[
                        "commentary",
                        "final_answer"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Phase"
                },
                "role":{
                  "const":"assistant",
                  "title":"Role",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"message",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "content",
                "role",
                "status",
                "type"
              ],
              "title":"ResponseOutputMessage",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The results of a file search tool call.\n\nSee the\n[file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.",
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "queries":{
                  "items":{
                    "type":"string"
                  },
                  "title":"Queries",
                  "type":"array"
                },
                "results":{
                  "anyOf":[
                    {
                      "items":{
                        "additionalProperties":true,
                        "properties":{
                          "attributes":{
                            "anyOf":[
                              {
                                "additionalProperties":{
                                  "anyOf":[
                                    {
                                      "type":"string"
                                    },
                                    {
                                      "type":"number"
                                    },
                                    {
                                      "type":"boolean"
                                    }
                                  ]
                                },
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Attributes"
                          },
                          "file_id":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"File Id"
                          },
                          "filename":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Filename"
                          },
                          "score":{
                            "anyOf":[
                              {
                                "type":"number"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Score"
                          },
                          "text":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Text"
                          }
                        },
                        "title":"Result",
                        "type":"object"
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Results"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "searching",
                    "completed",
                    "incomplete",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"file_search_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "queries",
                "status",
                "type"
              ],
              "title":"ResponseFileSearchToolCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to run a function.\n\nSee the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.",
              "properties":{
                "arguments":{
                  "title":"Arguments",
                  "type":"string"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "namespace":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Namespace"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"function_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "arguments",
                "call_id",
                "name",
                "type"
              ],
              "title":"ResponseFunctionToolCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"A text input to the model.",
                            "properties":{
                              "text":{
                                "title":"Text",
                                "type":"string"
                              },
                              "type":{
                                "const":"input_text",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "text",
                              "type"
                            ],
                            "title":"ResponseInputText",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision).",
                            "properties":{
                              "detail":{
                                "enum":[
                                  "low",
                                  "high",
                                  "auto",
                                  "original"
                                ],
                                "title":"Detail",
                                "type":"string"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "image_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Image Url"
                              },
                              "type":{
                                "const":"input_image",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "detail",
                              "type"
                            ],
                            "title":"ResponseInputImage",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A file input to the model.",
                            "properties":{
                              "detail":{
                                "anyOf":[
                                  {
                                    "enum":[
                                      "high",
                                      "low"
                                    ],
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Detail"
                              },
                              "file_data":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Data"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "file_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Url"
                              },
                              "filename":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Filename"
                              },
                              "type":{
                                "const":"input_file",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"ResponseInputFile",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    }
                  ],
                  "title":"Output"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"function_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "call_id",
                "output",
                "status",
                "type"
              ],
              "title":"ResponseFunctionToolCallOutputItem",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The results of a web search tool call.\n\nSee the\n[web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.",
              "properties":{
                "action":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "description":"Action type \"search\" - Performs a web search query.",
                      "properties":{
                        "queries":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Queries"
                        },
                        "query":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Query"
                        },
                        "sources":{
                          "anyOf":[
                            {
                              "items":{
                                "additionalProperties":true,
                                "description":"A source used in the search.",
                                "properties":{
                                  "type":{
                                    "const":"url",
                                    "title":"Type",
                                    "type":"string"
                                  },
                                  "url":{
                                    "title":"Url",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type",
                                  "url"
                                ],
                                "title":"ActionSearchSource",
                                "type":"object"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Sources"
                        },
                        "type":{
                          "const":"search",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionSearch",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Action type \"open_page\" - Opens a specific URL from search results.",
                      "properties":{
                        "type":{
                          "const":"open_page",
                          "title":"Type",
                          "type":"string"
                        },
                        "url":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Url"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionOpenPage",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Action type \"find_in_page\": Searches for a pattern within a loaded page.",
                      "properties":{
                        "pattern":{
                          "title":"Pattern",
                          "type":"string"
                        },
                        "type":{
                          "const":"find_in_page",
                          "title":"Type",
                          "type":"string"
                        },
                        "url":{
                          "title":"Url",
                          "type":"string"
                        }
                      },
                      "required":[
                        "pattern",
                        "type",
                        "url"
                      ],
                      "title":"ActionFind",
                      "type":"object"
                    }
                  ],
                  "title":"Action"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "searching",
                    "completed",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"web_search_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "action",
                "status",
                "type"
              ],
              "title":"ResponseFunctionWebSearch",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to a computer use tool.\n\nSee the\n[computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.",
              "properties":{
                "action":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "description":"A click action.",
                      "properties":{
                        "button":{
                          "enum":[
                            "left",
                            "right",
                            "wheel",
                            "back",
                            "forward"
                          ],
                          "title":"Button",
                          "type":"string"
                        },
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "type":{
                          "const":"click",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "button",
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionClick",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A double click action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "type":{
                          "const":"double_click",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionDoubleClick",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A drag action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "path":{
                          "items":{
                            "additionalProperties":true,
                            "description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.",
                            "properties":{
                              "x":{
                                "title":"X",
                                "type":"integer"
                              },
                              "y":{
                                "title":"Y",
                                "type":"integer"
                              }
                            },
                            "required":[
                              "x",
                              "y"
                            ],
                            "title":"ActionDragPath",
                            "type":"object"
                          },
                          "title":"Path",
                          "type":"array"
                        },
                        "type":{
                          "const":"drag",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "path",
                        "type"
                      ],
                      "title":"ActionDrag",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A collection of keypresses the model would like to perform.",
                      "properties":{
                        "keys":{
                          "items":{
                            "type":"string"
                          },
                          "title":"Keys",
                          "type":"array"
                        },
                        "type":{
                          "const":"keypress",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "keys",
                        "type"
                      ],
                      "title":"ActionKeypress",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A mouse move action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "type":{
                          "const":"move",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionMove",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A screenshot action.",
                      "properties":{
                        "type":{
                          "const":"screenshot",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionScreenshot",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A scroll action.",
                      "properties":{
                        "keys":{
                          "anyOf":[
                            {
                              "items":{
                                "type":"string"
                              },
                              "type":"array"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Keys"
                        },
                        "scroll_x":{
                          "title":"Scroll X",
                          "type":"integer"
                        },
                        "scroll_y":{
                          "title":"Scroll Y",
                          "type":"integer"
                        },
                        "type":{
                          "const":"scroll",
                          "title":"Type",
                          "type":"string"
                        },
                        "x":{
                          "title":"X",
                          "type":"integer"
                        },
                        "y":{
                          "title":"Y",
                          "type":"integer"
                        }
                      },
                      "required":[
                        "scroll_x",
                        "scroll_y",
                        "type",
                        "x",
                        "y"
                      ],
                      "title":"ActionScroll",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"An action to type in text.",
                      "properties":{
                        "text":{
                          "title":"Text",
                          "type":"string"
                        },
                        "type":{
                          "const":"type",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "text",
                        "type"
                      ],
                      "title":"ActionType",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A wait action.",
                      "properties":{
                        "type":{
                          "const":"wait",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ActionWait",
                      "type":"object"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Action"
                },
                "actions":{
                  "anyOf":[
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"A click action.",
                            "properties":{
                              "button":{
                                "enum":[
                                  "left",
                                  "right",
                                  "wheel",
                                  "back",
                                  "forward"
                                ],
                                "title":"Button",
                                "type":"string"
                              },
                              "keys":{
                                "anyOf":[
                                  {
                                    "items":{
                                      "type":"string"
                                    },
                                    "type":"array"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Keys"
                              },
                              "type":{
                                "const":"click",
                                "title":"Type",
                                "type":"string"
                              },
                              "x":{
                                "title":"X",
                                "type":"integer"
                              },
                              "y":{
                                "title":"Y",
                                "type":"integer"
                              }
                            },
                            "required":[
                              "button",
                              "type",
                              "x",
                              "y"
                            ],
                            "title":"Click",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A double click action.",
                            "properties":{
                              "keys":{
                                "anyOf":[
                                  {
                                    "items":{
                                      "type":"string"
                                    },
                                    "type":"array"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Keys"
                              },
                              "type":{
                                "const":"double_click",
                                "title":"Type",
                                "type":"string"
                              },
                              "x":{
                                "title":"X",
                                "type":"integer"
                              },
                              "y":{
                                "title":"Y",
                                "type":"integer"
                              }
                            },
                            "required":[
                              "type",
                              "x",
                              "y"
                            ],
                            "title":"DoubleClick",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A drag action.",
                            "properties":{
                              "keys":{
                                "anyOf":[
                                  {
                                    "items":{
                                      "type":"string"
                                    },
                                    "type":"array"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Keys"
                              },
                              "path":{
                                "items":{
                                  "additionalProperties":true,
                                  "description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.",
                                  "properties":{
                                    "x":{
                                      "title":"X",
                                      "type":"integer"
                                    },
                                    "y":{
                                      "title":"Y",
                                      "type":"integer"
                                    }
                                  },
                                  "required":[
                                    "x",
                                    "y"
                                  ],
                                  "title":"DragPath",
                                  "type":"object"
                                },
                                "title":"Path",
                                "type":"array"
                              },
                              "type":{
                                "const":"drag",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "path",
                              "type"
                            ],
                            "title":"Drag",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A collection of keypresses the model would like to perform.",
                            "properties":{
                              "keys":{
                                "items":{
                                  "type":"string"
                                },
                                "title":"Keys",
                                "type":"array"
                              },
                              "type":{
                                "const":"keypress",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "keys",
                              "type"
                            ],
                            "title":"Keypress",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A mouse move action.",
                            "properties":{
                              "keys":{
                                "anyOf":[
                                  {
                                    "items":{
                                      "type":"string"
                                    },
                                    "type":"array"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Keys"
                              },
                              "type":{
                                "const":"move",
                                "title":"Type",
                                "type":"string"
                              },
                              "x":{
                                "title":"X",
                                "type":"integer"
                              },
                              "y":{
                                "title":"Y",
                                "type":"integer"
                              }
                            },
                            "required":[
                              "type",
                              "x",
                              "y"
                            ],
                            "title":"Move",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A screenshot action.",
                            "properties":{
                              "type":{
                                "const":"screenshot",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"Screenshot",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A scroll action.",
                            "properties":{
                              "keys":{
                                "anyOf":[
                                  {
                                    "items":{
                                      "type":"string"
                                    },
                                    "type":"array"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Keys"
                              },
                              "scroll_x":{
                                "title":"Scroll X",
                                "type":"integer"
                              },
                              "scroll_y":{
                                "title":"Scroll Y",
                                "type":"integer"
                              },
                              "type":{
                                "const":"scroll",
                                "title":"Type",
                                "type":"string"
                              },
                              "x":{
                                "title":"X",
                                "type":"integer"
                              },
                              "y":{
                                "title":"Y",
                                "type":"integer"
                              }
                            },
                            "required":[
                              "scroll_x",
                              "scroll_y",
                              "type",
                              "x",
                              "y"
                            ],
                            "title":"Scroll",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"An action to type in text.",
                            "properties":{
                              "text":{
                                "title":"Text",
                                "type":"string"
                              },
                              "type":{
                                "const":"type",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "text",
                              "type"
                            ],
                            "title":"Type",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A wait action.",
                            "properties":{
                              "type":{
                                "const":"wait",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"Wait",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Actions"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "pending_safety_checks":{
                  "items":{
                    "additionalProperties":true,
                    "description":"A pending safety check for the computer call.",
                    "properties":{
                      "code":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Code"
                      },
                      "id":{
                        "title":"Id",
                        "type":"string"
                      },
                      "message":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Message"
                      }
                    },
                    "required":[
                      "id"
                    ],
                    "title":"PendingSafetyCheck",
                    "type":"object"
                  },
                  "title":"Pending Safety Checks",
                  "type":"array"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"computer_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "call_id",
                "pending_safety_checks",
                "status",
                "type"
              ],
              "title":"ResponseComputerToolCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "acknowledged_safety_checks":{
                  "anyOf":[
                    {
                      "items":{
                        "additionalProperties":true,
                        "description":"A pending safety check for the computer call.",
                        "properties":{
                          "code":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Code"
                          },
                          "id":{
                            "title":"Id",
                            "type":"string"
                          },
                          "message":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Message"
                          }
                        },
                        "required":[
                          "id"
                        ],
                        "title":"AcknowledgedSafetyCheck",
                        "type":"object"
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Acknowledged Safety Checks"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "output":{
                  "additionalProperties":true,
                  "description":"A computer screenshot image used with the computer use tool.",
                  "properties":{
                    "file_id":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"File Id"
                    },
                    "image_url":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Image Url"
                    },
                    "type":{
                      "const":"computer_screenshot",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "type"
                  ],
                  "title":"ResponseComputerToolCallOutputScreenshot",
                  "type":"object"
                },
                "status":{
                  "enum":[
                    "completed",
                    "incomplete",
                    "failed",
                    "in_progress"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"computer_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "call_id",
                "output",
                "status",
                "type"
              ],
              "title":"ResponseComputerToolCallOutputItem",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state).",
              "properties":{
                "content":{
                  "anyOf":[
                    {
                      "items":{
                        "additionalProperties":true,
                        "description":"Reasoning text from the model.",
                        "properties":{
                          "text":{
                            "title":"Text",
                            "type":"string"
                          },
                          "type":{
                            "const":"reasoning_text",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "text",
                          "type"
                        ],
                        "title":"Content",
                        "type":"object"
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Content"
                },
                "encrypted_content":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Encrypted Content"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "summary":{
                  "items":{
                    "additionalProperties":true,
                    "description":"A summary text from the model.",
                    "properties":{
                      "text":{
                        "title":"Text",
                        "type":"string"
                      },
                      "type":{
                        "const":"summary_text",
                        "title":"Type",
                        "type":"string"
                      }
                    },
                    "required":[
                      "text",
                      "type"
                    ],
                    "title":"Summary",
                    "type":"object"
                  },
                  "title":"Summary",
                  "type":"array"
                },
                "type":{
                  "const":"reasoning",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "summary",
                "type"
              ],
              "title":"ResponseReasoningItem",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "arguments":{
                  "title":"Arguments"
                },
                "call_id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Call Id"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "execution":{
                  "enum":[
                    "server",
                    "client"
                  ],
                  "title":"Execution",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"tool_search_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "arguments",
                "execution",
                "status",
                "type"
              ],
              "title":"ResponseToolSearchCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "call_id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Call Id"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "execution":{
                  "enum":[
                    "server",
                    "client"
                  ],
                  "title":"Execution",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "tools":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"Defines a function in your own code the model can choose to call.\n\nLearn more about [function calling](https://platform.openai.com/docs/guides/function-calling).",
                        "properties":{
                          "defer_loading":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Defer Loading"
                          },
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "parameters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "strict":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Strict"
                          },
                          "type":{
                            "const":"function",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "type"
                        ],
                        "title":"FunctionTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that searches for relevant content from uploaded files.\n\nLearn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                "properties":{
                                  "key":{
                                    "title":"Key",
                                    "type":"string"
                                  },
                                  "type":{
                                    "enum":[
                                      "eq",
                                      "ne",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "nin"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  },
                                  "value":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"number"
                                      },
                                      {
                                        "type":"boolean"
                                      },
                                      {
                                        "items":{
                                          "anyOf":[
                                            {
                                              "type":"string"
                                            },
                                            {
                                              "type":"number"
                                            }
                                          ]
                                        },
                                        "type":"array"
                                      }
                                    ],
                                    "title":"Value"
                                  }
                                },
                                "required":[
                                  "key",
                                  "type",
                                  "value"
                                ],
                                "title":"ComparisonFilter",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Combine multiple filters using `and` or `or`.",
                                "properties":{
                                  "filters":{
                                    "items":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                          "properties":{
                                            "key":{
                                              "title":"Key",
                                              "type":"string"
                                            },
                                            "type":{
                                              "enum":[
                                                "eq",
                                                "ne",
                                                "gt",
                                                "gte",
                                                "lt",
                                                "lte",
                                                "in",
                                                "nin"
                                              ],
                                              "title":"Type",
                                              "type":"string"
                                            },
                                            "value":{
                                              "anyOf":[
                                                {
                                                  "type":"string"
                                                },
                                                {
                                                  "type":"number"
                                                },
                                                {
                                                  "type":"boolean"
                                                },
                                                {
                                                  "items":{
                                                    "anyOf":[
                                                      {
                                                        "type":"string"
                                                      },
                                                      {
                                                        "type":"number"
                                                      }
                                                    ]
                                                  },
                                                  "type":"array"
                                                }
                                              ],
                                              "title":"Value"
                                            }
                                          },
                                          "required":[
                                            "key",
                                            "type",
                                            "value"
                                          ],
                                          "title":"ComparisonFilter",
                                          "type":"object"
                                        },
                                        {}
                                      ]
                                    },
                                    "title":"Filters",
                                    "type":"array"
                                  },
                                  "type":{
                                    "enum":[
                                      "and",
                                      "or"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "filters",
                                  "type"
                                ],
                                "title":"CompoundFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Filters"
                          },
                          "max_num_results":{
                            "anyOf":[
                              {
                                "type":"integer"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Max Num Results"
                          },
                          "ranking_options":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Ranking options for search.",
                                "properties":{
                                  "hybrid_search":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.",
                                        "properties":{
                                          "embedding_weight":{
                                            "title":"Embedding Weight",
                                            "type":"number"
                                          },
                                          "text_weight":{
                                            "title":"Text Weight",
                                            "type":"number"
                                          }
                                        },
                                        "required":[
                                          "embedding_weight",
                                          "text_weight"
                                        ],
                                        "title":"RankingOptionsHybridSearch",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ]
                                  },
                                  "ranker":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "auto",
                                          "default-2024-11-15"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Ranker"
                                  },
                                  "score_threshold":{
                                    "anyOf":[
                                      {
                                        "type":"number"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Score Threshold"
                                  }
                                },
                                "title":"RankingOptions",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "type":{
                            "const":"file_search",
                            "title":"Type",
                            "type":"string"
                          },
                          "vector_store_ids":{
                            "items":{
                              "type":"string"
                            },
                            "title":"Vector Store Ids",
                            "type":"array"
                          }
                        },
                        "required":[
                          "type",
                          "vector_store_ids"
                        ],
                        "title":"FileSearchTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "type":{
                            "const":"computer",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ComputerTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "display_height":{
                            "title":"Display Height",
                            "type":"integer"
                          },
                          "display_width":{
                            "title":"Display Width",
                            "type":"integer"
                          },
                          "environment":{
                            "enum":[
                              "windows",
                              "mac",
                              "linux",
                              "ubuntu",
                              "browser"
                            ],
                            "title":"Environment",
                            "type":"string"
                          },
                          "type":{
                            "const":"computer_use_preview",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "display_height",
                          "display_width",
                          "environment",
                          "type"
                        ],
                        "title":"ComputerUsePreviewTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Search the Internet for sources related to the prompt.\n\nLearn more about the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Filters for the search.",
                                "properties":{
                                  "allowed_domains":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Allowed Domains"
                                  }
                                },
                                "title":"Filters",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "search_context_size":{
                            "anyOf":[
                              {
                                "enum":[
                                  "low",
                                  "medium",
                                  "high"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Search Context Size"
                          },
                          "type":{
                            "enum":[
                              "web_search",
                              "web_search_2025_08_26"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The approximate location of the user.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "anyOf":[
                                      {
                                        "const":"approximate",
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Type"
                                  }
                                },
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).",
                        "properties":{
                          "allowed_tools":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A filter object to specify which tools are allowed.",
                                "properties":{
                                  "read_only":{
                                    "anyOf":[
                                      {
                                        "type":"boolean"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Read Only"
                                  },
                                  "tool_names":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Tool Names"
                                  }
                                },
                                "title":"McpAllowedToolsMcpToolFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Allowed Tools"
                          },
                          "authorization":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Authorization"
                          },
                          "connector_id":{
                            "anyOf":[
                              {
                                "enum":[
                                  "connector_dropbox",
                                  "connector_gmail",
                                  "connector_googlecalendar",
                                  "connector_googledrive",
                                  "connector_microsoftteams",
                                  "connector_outlookcalendar",
                                  "connector_outlookemail",
                                  "connector_sharepoint"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Connector Id"
                          },
                          "defer_loading":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Defer Loading"
                          },
                          "headers":{
                            "anyOf":[
                              {
                                "additionalProperties":{
                                  "type":"string"
                                },
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Headers"
                          },
                          "require_approval":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Specify which of the MCP server's tools require approval.\n\nCan be\n`always`, `never`, or a filter object associated with tools\nthat require approval.",
                                "properties":{
                                  "always":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "description":"A filter object to specify which tools are allowed.",
                                        "properties":{
                                          "read_only":{
                                            "anyOf":[
                                              {
                                                "type":"boolean"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Read Only"
                                          },
                                          "tool_names":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "type":"string"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Tool Names"
                                          }
                                        },
                                        "title":"McpRequireApprovalMcpToolApprovalFilterAlways",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ]
                                  },
                                  "never":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "description":"A filter object to specify which tools are allowed.",
                                        "properties":{
                                          "read_only":{
                                            "anyOf":[
                                              {
                                                "type":"boolean"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Read Only"
                                          },
                                          "tool_names":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "type":"string"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Tool Names"
                                          }
                                        },
                                        "title":"McpRequireApprovalMcpToolApprovalFilterNever",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ]
                                  }
                                },
                                "title":"McpRequireApprovalMcpToolApprovalFilter",
                                "type":"object"
                              },
                              {
                                "enum":[
                                  "always",
                                  "never"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Require Approval"
                          },
                          "server_description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Server Description"
                          },
                          "server_label":{
                            "title":"Server Label",
                            "type":"string"
                          },
                          "server_url":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Server Url"
                          },
                          "tunnel_id":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Tunnel Id"
                          },
                          "type":{
                            "const":"mcp",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "server_label",
                          "type"
                        ],
                        "title":"Mcp",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that runs Python code to help generate a response to a prompt.",
                        "properties":{
                          "container":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Configuration for a code interpreter container.\n\nOptionally specify the IDs of the files to run the code on.",
                                "properties":{
                                  "file_ids":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"File Ids"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabled",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "additionalProperties":true,
                                                  "properties":{
                                                    "domain":{
                                                      "title":"Domain",
                                                      "type":"string"
                                                    },
                                                    "name":{
                                                      "title":"Name",
                                                      "type":"string"
                                                    },
                                                    "value":{
                                                      "title":"Value",
                                                      "type":"string"
                                                    }
                                                  },
                                                  "required":[
                                                    "domain",
                                                    "name",
                                                    "value"
                                                  ],
                                                  "title":"ContainerNetworkPolicyDomainSecret",
                                                  "type":"object"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Domain Secrets"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlist",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "type":{
                                    "const":"auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"CodeInterpreterContainerCodeInterpreterToolAuto",
                                "type":"object"
                              }
                            ],
                            "title":"Container"
                          },
                          "type":{
                            "const":"code_interpreter",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "container",
                          "type"
                        ],
                        "title":"CodeInterpreter",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that generates images using the GPT image models.",
                        "properties":{
                          "action":{
                            "anyOf":[
                              {
                                "enum":[
                                  "generate",
                                  "edit",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Action"
                          },
                          "background":{
                            "anyOf":[
                              {
                                "enum":[
                                  "transparent",
                                  "opaque",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Background"
                          },
                          "input_fidelity":{
                            "anyOf":[
                              {
                                "enum":[
                                  "high",
                                  "low"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Input Fidelity"
                          },
                          "input_image_mask":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Optional mask for inpainting.\n\nContains `image_url`\n(string, optional) and `file_id` (string, optional).",
                                "properties":{
                                  "file_id":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"File Id"
                                  },
                                  "image_url":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Image Url"
                                  }
                                },
                                "title":"ImageGenerationInputImageMask",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "model":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "gpt-image-1",
                                  "gpt-image-1-mini",
                                  "gpt-image-2",
                                  "gpt-image-2-2026-04-21",
                                  "gpt-image-1.5",
                                  "chatgpt-image-latest"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Model"
                          },
                          "moderation":{
                            "anyOf":[
                              {
                                "enum":[
                                  "auto",
                                  "low"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Moderation"
                          },
                          "output_compression":{
                            "anyOf":[
                              {
                                "type":"integer"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Output Compression"
                          },
                          "output_format":{
                            "anyOf":[
                              {
                                "enum":[
                                  "png",
                                  "webp",
                                  "jpeg"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Output Format"
                          },
                          "partial_images":{
                            "anyOf":[
                              {
                                "type":"integer"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Partial Images"
                          },
                          "quality":{
                            "anyOf":[
                              {
                                "enum":[
                                  "low",
                                  "medium",
                                  "high",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Quality"
                          },
                          "size":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "1024x1024",
                                  "1024x1536",
                                  "1536x1024",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Size"
                          },
                          "type":{
                            "const":"image_generation",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ImageGeneration",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands in a local environment.",
                        "properties":{
                          "type":{
                            "const":"local_shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"LocalShell",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands.",
                        "properties":{
                          "environment":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "file_ids":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"File Ids"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabled",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "additionalProperties":true,
                                                  "properties":{
                                                    "domain":{
                                                      "title":"Domain",
                                                      "type":"string"
                                                    },
                                                    "name":{
                                                      "title":"Name",
                                                      "type":"string"
                                                    },
                                                    "value":{
                                                      "title":"Value",
                                                      "type":"string"
                                                    }
                                                  },
                                                  "required":[
                                                    "domain",
                                                    "name",
                                                    "value"
                                                  ],
                                                  "title":"ContainerNetworkPolicyDomainSecret",
                                                  "type":"object"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Domain Secrets"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlist",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "skills":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "anyOf":[
                                            {
                                              "additionalProperties":true,
                                              "properties":{
                                                "skill_id":{
                                                  "title":"Skill Id",
                                                  "type":"string"
                                                },
                                                "type":{
                                                  "const":"skill_reference",
                                                  "title":"Type",
                                                  "type":"string"
                                                },
                                                "version":{
                                                  "anyOf":[
                                                    {
                                                      "type":"string"
                                                    },
                                                    {
                                                      "type":"null"
                                                    }
                                                  ],
                                                  "title":"Version"
                                                }
                                              },
                                              "required":[
                                                "skill_id",
                                                "type"
                                              ],
                                              "title":"SkillReference",
                                              "type":"object"
                                            },
                                            {
                                              "additionalProperties":true,
                                              "properties":{
                                                "description":{
                                                  "title":"Description",
                                                  "type":"string"
                                                },
                                                "name":{
                                                  "title":"Name",
                                                  "type":"string"
                                                },
                                                "source":{
                                                  "additionalProperties":true,
                                                  "description":"Inline skill payload",
                                                  "properties":{
                                                    "data":{
                                                      "title":"Data",
                                                      "type":"string"
                                                    },
                                                    "media_type":{
                                                      "const":"application/zip",
                                                      "title":"Media Type",
                                                      "type":"string"
                                                    },
                                                    "type":{
                                                      "const":"base64",
                                                      "title":"Type",
                                                      "type":"string"
                                                    }
                                                  },
                                                  "required":[
                                                    "data",
                                                    "media_type",
                                                    "type"
                                                  ],
                                                  "title":"InlineSkillSource",
                                                  "type":"object"
                                                },
                                                "type":{
                                                  "const":"inline",
                                                  "title":"Type",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "description",
                                                "name",
                                                "source",
                                                "type"
                                              ],
                                              "title":"InlineSkill",
                                              "type":"object"
                                            }
                                          ]
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Skills"
                                  },
                                  "type":{
                                    "const":"container_auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"ContainerAuto",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "skills":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "additionalProperties":true,
                                          "properties":{
                                            "description":{
                                              "title":"Description",
                                              "type":"string"
                                            },
                                            "name":{
                                              "title":"Name",
                                              "type":"string"
                                            },
                                            "path":{
                                              "title":"Path",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "description",
                                            "name",
                                            "path"
                                          ],
                                          "title":"LocalSkill",
                                          "type":"object"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Skills"
                                  },
                                  "type":{
                                    "const":"local",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"LocalEnvironment",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "container_id":{
                                    "title":"Container Id",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"container_reference",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "container_id",
                                  "type"
                                ],
                                "title":"ContainerReference",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Environment"
                          },
                          "type":{
                            "const":"shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"FunctionShellTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                        "properties":{
                          "defer_loading":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Defer Loading"
                          },
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "format":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Unconstrained free-form text.",
                                "properties":{
                                  "type":{
                                    "const":"text",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"Text",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A grammar defined by the user.",
                                "properties":{
                                  "definition":{
                                    "title":"Definition",
                                    "type":"string"
                                  },
                                  "syntax":{
                                    "enum":[
                                      "lark",
                                      "regex"
                                    ],
                                    "title":"Syntax",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"grammar",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "definition",
                                  "syntax",
                                  "type"
                                ],
                                "title":"Grammar",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Format"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "type":{
                            "const":"custom",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "type"
                        ],
                        "title":"CustomTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Groups function/custom tools under a shared namespace.",
                        "properties":{
                          "description":{
                            "title":"Description",
                            "type":"string"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "tools":{
                            "items":{
                              "anyOf":[
                                {
                                  "additionalProperties":true,
                                  "properties":{
                                    "defer_loading":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Defer Loading"
                                    },
                                    "description":{
                                      "anyOf":[
                                        {
                                          "type":"string"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Description"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "parameters":{
                                      "anyOf":[
                                        {},
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Parameters"
                                    },
                                    "strict":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Strict"
                                    },
                                    "type":{
                                      "const":"function",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"ToolFunction",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                                  "properties":{
                                    "defer_loading":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Defer Loading"
                                    },
                                    "description":{
                                      "anyOf":[
                                        {
                                          "type":"string"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Description"
                                    },
                                    "format":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"Unconstrained free-form text.",
                                          "properties":{
                                            "type":{
                                              "const":"text",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "type"
                                          ],
                                          "title":"Text",
                                          "type":"object"
                                        },
                                        {
                                          "additionalProperties":true,
                                          "description":"A grammar defined by the user.",
                                          "properties":{
                                            "definition":{
                                              "title":"Definition",
                                              "type":"string"
                                            },
                                            "syntax":{
                                              "enum":[
                                                "lark",
                                                "regex"
                                              ],
                                              "title":"Syntax",
                                              "type":"string"
                                            },
                                            "type":{
                                              "const":"grammar",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "definition",
                                            "syntax",
                                            "type"
                                          ],
                                          "title":"Grammar",
                                          "type":"object"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Format"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "type":{
                                      "const":"custom",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"CustomTool",
                                  "type":"object"
                                }
                              ]
                            },
                            "title":"Tools",
                            "type":"array"
                          },
                          "type":{
                            "const":"namespace",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "description",
                          "name",
                          "tools",
                          "type"
                        ],
                        "title":"NamespaceTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Hosted or BYOT tool search configuration for deferred tools.",
                        "properties":{
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "execution":{
                            "anyOf":[
                              {
                                "enum":[
                                  "server",
                                  "client"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Execution"
                          },
                          "parameters":{
                            "anyOf":[
                              {},
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "type":{
                            "const":"tool_search",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ToolSearchTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"This tool searches the web for relevant results to use in a response.\n\nLearn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "search_content_types":{
                            "anyOf":[
                              {
                                "items":{
                                  "enum":[
                                    "text",
                                    "image"
                                  ],
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Search Content Types"
                          },
                          "search_context_size":{
                            "anyOf":[
                              {
                                "enum":[
                                  "low",
                                  "medium",
                                  "high"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Search Context Size"
                          },
                          "type":{
                            "enum":[
                              "web_search_preview",
                              "web_search_preview_2025_03_11"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The user's location.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "const":"approximate",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchPreviewTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Allows the assistant to create, delete, or update files using unified diffs.",
                        "properties":{
                          "type":{
                            "const":"apply_patch",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ApplyPatchTool",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Tools",
                  "type":"array"
                },
                "type":{
                  "const":"tool_search_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "execution",
                "status",
                "tools",
                "type"
              ],
              "title":"ResponseToolSearchOutputItem",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "role":{
                  "enum":[
                    "unknown",
                    "user",
                    "assistant",
                    "system",
                    "critic",
                    "discriminator",
                    "developer",
                    "tool"
                  ],
                  "title":"Role",
                  "type":"string"
                },
                "tools":{
                  "items":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "description":"Defines a function in your own code the model can choose to call.\n\nLearn more about [function calling](https://platform.openai.com/docs/guides/function-calling).",
                        "properties":{
                          "defer_loading":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Defer Loading"
                          },
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "parameters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "strict":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Strict"
                          },
                          "type":{
                            "const":"function",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "type"
                        ],
                        "title":"FunctionTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that searches for relevant content from uploaded files.\n\nLearn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                "properties":{
                                  "key":{
                                    "title":"Key",
                                    "type":"string"
                                  },
                                  "type":{
                                    "enum":[
                                      "eq",
                                      "ne",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "nin"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  },
                                  "value":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"number"
                                      },
                                      {
                                        "type":"boolean"
                                      },
                                      {
                                        "items":{
                                          "anyOf":[
                                            {
                                              "type":"string"
                                            },
                                            {
                                              "type":"number"
                                            }
                                          ]
                                        },
                                        "type":"array"
                                      }
                                    ],
                                    "title":"Value"
                                  }
                                },
                                "required":[
                                  "key",
                                  "type",
                                  "value"
                                ],
                                "title":"ComparisonFilter",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Combine multiple filters using `and` or `or`.",
                                "properties":{
                                  "filters":{
                                    "items":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                                          "properties":{
                                            "key":{
                                              "title":"Key",
                                              "type":"string"
                                            },
                                            "type":{
                                              "enum":[
                                                "eq",
                                                "ne",
                                                "gt",
                                                "gte",
                                                "lt",
                                                "lte",
                                                "in",
                                                "nin"
                                              ],
                                              "title":"Type",
                                              "type":"string"
                                            },
                                            "value":{
                                              "anyOf":[
                                                {
                                                  "type":"string"
                                                },
                                                {
                                                  "type":"number"
                                                },
                                                {
                                                  "type":"boolean"
                                                },
                                                {
                                                  "items":{
                                                    "anyOf":[
                                                      {
                                                        "type":"string"
                                                      },
                                                      {
                                                        "type":"number"
                                                      }
                                                    ]
                                                  },
                                                  "type":"array"
                                                }
                                              ],
                                              "title":"Value"
                                            }
                                          },
                                          "required":[
                                            "key",
                                            "type",
                                            "value"
                                          ],
                                          "title":"ComparisonFilter",
                                          "type":"object"
                                        },
                                        {}
                                      ]
                                    },
                                    "title":"Filters",
                                    "type":"array"
                                  },
                                  "type":{
                                    "enum":[
                                      "and",
                                      "or"
                                    ],
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "filters",
                                  "type"
                                ],
                                "title":"CompoundFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Filters"
                          },
                          "max_num_results":{
                            "anyOf":[
                              {
                                "type":"integer"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Max Num Results"
                          },
                          "ranking_options":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Ranking options for search.",
                                "properties":{
                                  "hybrid_search":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.",
                                        "properties":{
                                          "embedding_weight":{
                                            "title":"Embedding Weight",
                                            "type":"number"
                                          },
                                          "text_weight":{
                                            "title":"Text Weight",
                                            "type":"number"
                                          }
                                        },
                                        "required":[
                                          "embedding_weight",
                                          "text_weight"
                                        ],
                                        "title":"RankingOptionsHybridSearch",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ]
                                  },
                                  "ranker":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "auto",
                                          "default-2024-11-15"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Ranker"
                                  },
                                  "score_threshold":{
                                    "anyOf":[
                                      {
                                        "type":"number"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Score Threshold"
                                  }
                                },
                                "title":"RankingOptions",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "type":{
                            "const":"file_search",
                            "title":"Type",
                            "type":"string"
                          },
                          "vector_store_ids":{
                            "items":{
                              "type":"string"
                            },
                            "title":"Vector Store Ids",
                            "type":"array"
                          }
                        },
                        "required":[
                          "type",
                          "vector_store_ids"
                        ],
                        "title":"FileSearchTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "type":{
                            "const":"computer",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ComputerTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
                        "properties":{
                          "display_height":{
                            "title":"Display Height",
                            "type":"integer"
                          },
                          "display_width":{
                            "title":"Display Width",
                            "type":"integer"
                          },
                          "environment":{
                            "enum":[
                              "windows",
                              "mac",
                              "linux",
                              "ubuntu",
                              "browser"
                            ],
                            "title":"Environment",
                            "type":"string"
                          },
                          "type":{
                            "const":"computer_use_preview",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "display_height",
                          "display_width",
                          "environment",
                          "type"
                        ],
                        "title":"ComputerUsePreviewTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Search the Internet for sources related to the prompt.\n\nLearn more about the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "filters":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Filters for the search.",
                                "properties":{
                                  "allowed_domains":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Allowed Domains"
                                  }
                                },
                                "title":"Filters",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "search_context_size":{
                            "anyOf":[
                              {
                                "enum":[
                                  "low",
                                  "medium",
                                  "high"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Search Context Size"
                          },
                          "type":{
                            "enum":[
                              "web_search",
                              "web_search_2025_08_26"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The approximate location of the user.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "anyOf":[
                                      {
                                        "const":"approximate",
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Type"
                                  }
                                },
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).",
                        "properties":{
                          "allowed_tools":{
                            "anyOf":[
                              {
                                "items":{
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A filter object to specify which tools are allowed.",
                                "properties":{
                                  "read_only":{
                                    "anyOf":[
                                      {
                                        "type":"boolean"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Read Only"
                                  },
                                  "tool_names":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Tool Names"
                                  }
                                },
                                "title":"McpAllowedToolsMcpToolFilter",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Allowed Tools"
                          },
                          "authorization":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Authorization"
                          },
                          "connector_id":{
                            "anyOf":[
                              {
                                "enum":[
                                  "connector_dropbox",
                                  "connector_gmail",
                                  "connector_googlecalendar",
                                  "connector_googledrive",
                                  "connector_microsoftteams",
                                  "connector_outlookcalendar",
                                  "connector_outlookemail",
                                  "connector_sharepoint"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Connector Id"
                          },
                          "defer_loading":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Defer Loading"
                          },
                          "headers":{
                            "anyOf":[
                              {
                                "additionalProperties":{
                                  "type":"string"
                                },
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Headers"
                          },
                          "require_approval":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Specify which of the MCP server's tools require approval.\n\nCan be\n`always`, `never`, or a filter object associated with tools\nthat require approval.",
                                "properties":{
                                  "always":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "description":"A filter object to specify which tools are allowed.",
                                        "properties":{
                                          "read_only":{
                                            "anyOf":[
                                              {
                                                "type":"boolean"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Read Only"
                                          },
                                          "tool_names":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "type":"string"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Tool Names"
                                          }
                                        },
                                        "title":"McpRequireApprovalMcpToolApprovalFilterAlways",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ]
                                  },
                                  "never":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "description":"A filter object to specify which tools are allowed.",
                                        "properties":{
                                          "read_only":{
                                            "anyOf":[
                                              {
                                                "type":"boolean"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Read Only"
                                          },
                                          "tool_names":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "type":"string"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Tool Names"
                                          }
                                        },
                                        "title":"McpRequireApprovalMcpToolApprovalFilterNever",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ]
                                  }
                                },
                                "title":"McpRequireApprovalMcpToolApprovalFilter",
                                "type":"object"
                              },
                              {
                                "enum":[
                                  "always",
                                  "never"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Require Approval"
                          },
                          "server_description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Server Description"
                          },
                          "server_label":{
                            "title":"Server Label",
                            "type":"string"
                          },
                          "server_url":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Server Url"
                          },
                          "tunnel_id":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Tunnel Id"
                          },
                          "type":{
                            "const":"mcp",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "server_label",
                          "type"
                        ],
                        "title":"Mcp",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that runs Python code to help generate a response to a prompt.",
                        "properties":{
                          "container":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "additionalProperties":true,
                                "description":"Configuration for a code interpreter container.\n\nOptionally specify the IDs of the files to run the code on.",
                                "properties":{
                                  "file_ids":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"File Ids"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabled",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "additionalProperties":true,
                                                  "properties":{
                                                    "domain":{
                                                      "title":"Domain",
                                                      "type":"string"
                                                    },
                                                    "name":{
                                                      "title":"Name",
                                                      "type":"string"
                                                    },
                                                    "value":{
                                                      "title":"Value",
                                                      "type":"string"
                                                    }
                                                  },
                                                  "required":[
                                                    "domain",
                                                    "name",
                                                    "value"
                                                  ],
                                                  "title":"ContainerNetworkPolicyDomainSecret",
                                                  "type":"object"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Domain Secrets"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlist",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "type":{
                                    "const":"auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"CodeInterpreterContainerCodeInterpreterToolAuto",
                                "type":"object"
                              }
                            ],
                            "title":"Container"
                          },
                          "type":{
                            "const":"code_interpreter",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "container",
                          "type"
                        ],
                        "title":"CodeInterpreter",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that generates images using the GPT image models.",
                        "properties":{
                          "action":{
                            "anyOf":[
                              {
                                "enum":[
                                  "generate",
                                  "edit",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Action"
                          },
                          "background":{
                            "anyOf":[
                              {
                                "enum":[
                                  "transparent",
                                  "opaque",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Background"
                          },
                          "input_fidelity":{
                            "anyOf":[
                              {
                                "enum":[
                                  "high",
                                  "low"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Input Fidelity"
                          },
                          "input_image_mask":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Optional mask for inpainting.\n\nContains `image_url`\n(string, optional) and `file_id` (string, optional).",
                                "properties":{
                                  "file_id":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"File Id"
                                  },
                                  "image_url":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Image Url"
                                  }
                                },
                                "title":"ImageGenerationInputImageMask",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          },
                          "model":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "gpt-image-1",
                                  "gpt-image-1-mini",
                                  "gpt-image-2",
                                  "gpt-image-2-2026-04-21",
                                  "gpt-image-1.5",
                                  "chatgpt-image-latest"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Model"
                          },
                          "moderation":{
                            "anyOf":[
                              {
                                "enum":[
                                  "auto",
                                  "low"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Moderation"
                          },
                          "output_compression":{
                            "anyOf":[
                              {
                                "type":"integer"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Output Compression"
                          },
                          "output_format":{
                            "anyOf":[
                              {
                                "enum":[
                                  "png",
                                  "webp",
                                  "jpeg"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Output Format"
                          },
                          "partial_images":{
                            "anyOf":[
                              {
                                "type":"integer"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Partial Images"
                          },
                          "quality":{
                            "anyOf":[
                              {
                                "enum":[
                                  "low",
                                  "medium",
                                  "high",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Quality"
                          },
                          "size":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "enum":[
                                  "1024x1024",
                                  "1024x1536",
                                  "1536x1024",
                                  "auto"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Size"
                          },
                          "type":{
                            "const":"image_generation",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ImageGeneration",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands in a local environment.",
                        "properties":{
                          "type":{
                            "const":"local_shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"LocalShell",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A tool that allows the model to execute shell commands.",
                        "properties":{
                          "environment":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "file_ids":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "type":"string"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"File Ids"
                                  },
                                  "memory_limit":{
                                    "anyOf":[
                                      {
                                        "enum":[
                                          "1g",
                                          "4g",
                                          "16g",
                                          "64g"
                                        ],
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Memory Limit"
                                  },
                                  "network_policy":{
                                    "anyOf":[
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "type":{
                                            "const":"disabled",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyDisabled",
                                        "type":"object"
                                      },
                                      {
                                        "additionalProperties":true,
                                        "properties":{
                                          "allowed_domains":{
                                            "items":{
                                              "type":"string"
                                            },
                                            "title":"Allowed Domains",
                                            "type":"array"
                                          },
                                          "domain_secrets":{
                                            "anyOf":[
                                              {
                                                "items":{
                                                  "additionalProperties":true,
                                                  "properties":{
                                                    "domain":{
                                                      "title":"Domain",
                                                      "type":"string"
                                                    },
                                                    "name":{
                                                      "title":"Name",
                                                      "type":"string"
                                                    },
                                                    "value":{
                                                      "title":"Value",
                                                      "type":"string"
                                                    }
                                                  },
                                                  "required":[
                                                    "domain",
                                                    "name",
                                                    "value"
                                                  ],
                                                  "title":"ContainerNetworkPolicyDomainSecret",
                                                  "type":"object"
                                                },
                                                "type":"array"
                                              },
                                              {
                                                "type":"null"
                                              }
                                            ],
                                            "title":"Domain Secrets"
                                          },
                                          "type":{
                                            "const":"allowlist",
                                            "title":"Type",
                                            "type":"string"
                                          }
                                        },
                                        "required":[
                                          "allowed_domains",
                                          "type"
                                        ],
                                        "title":"ContainerNetworkPolicyAllowlist",
                                        "type":"object"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Network Policy"
                                  },
                                  "skills":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "anyOf":[
                                            {
                                              "additionalProperties":true,
                                              "properties":{
                                                "skill_id":{
                                                  "title":"Skill Id",
                                                  "type":"string"
                                                },
                                                "type":{
                                                  "const":"skill_reference",
                                                  "title":"Type",
                                                  "type":"string"
                                                },
                                                "version":{
                                                  "anyOf":[
                                                    {
                                                      "type":"string"
                                                    },
                                                    {
                                                      "type":"null"
                                                    }
                                                  ],
                                                  "title":"Version"
                                                }
                                              },
                                              "required":[
                                                "skill_id",
                                                "type"
                                              ],
                                              "title":"SkillReference",
                                              "type":"object"
                                            },
                                            {
                                              "additionalProperties":true,
                                              "properties":{
                                                "description":{
                                                  "title":"Description",
                                                  "type":"string"
                                                },
                                                "name":{
                                                  "title":"Name",
                                                  "type":"string"
                                                },
                                                "source":{
                                                  "additionalProperties":true,
                                                  "description":"Inline skill payload",
                                                  "properties":{
                                                    "data":{
                                                      "title":"Data",
                                                      "type":"string"
                                                    },
                                                    "media_type":{
                                                      "const":"application/zip",
                                                      "title":"Media Type",
                                                      "type":"string"
                                                    },
                                                    "type":{
                                                      "const":"base64",
                                                      "title":"Type",
                                                      "type":"string"
                                                    }
                                                  },
                                                  "required":[
                                                    "data",
                                                    "media_type",
                                                    "type"
                                                  ],
                                                  "title":"InlineSkillSource",
                                                  "type":"object"
                                                },
                                                "type":{
                                                  "const":"inline",
                                                  "title":"Type",
                                                  "type":"string"
                                                }
                                              },
                                              "required":[
                                                "description",
                                                "name",
                                                "source",
                                                "type"
                                              ],
                                              "title":"InlineSkill",
                                              "type":"object"
                                            }
                                          ]
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Skills"
                                  },
                                  "type":{
                                    "const":"container_auto",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"ContainerAuto",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "skills":{
                                    "anyOf":[
                                      {
                                        "items":{
                                          "additionalProperties":true,
                                          "properties":{
                                            "description":{
                                              "title":"Description",
                                              "type":"string"
                                            },
                                            "name":{
                                              "title":"Name",
                                              "type":"string"
                                            },
                                            "path":{
                                              "title":"Path",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "description",
                                            "name",
                                            "path"
                                          ],
                                          "title":"LocalSkill",
                                          "type":"object"
                                        },
                                        "type":"array"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Skills"
                                  },
                                  "type":{
                                    "const":"local",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"LocalEnvironment",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "container_id":{
                                    "title":"Container Id",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"container_reference",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "container_id",
                                  "type"
                                ],
                                "title":"ContainerReference",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Environment"
                          },
                          "type":{
                            "const":"shell",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"FunctionShellTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                        "properties":{
                          "defer_loading":{
                            "anyOf":[
                              {
                                "type":"boolean"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Defer Loading"
                          },
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "format":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"Unconstrained free-form text.",
                                "properties":{
                                  "type":{
                                    "const":"text",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"Text",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "description":"A grammar defined by the user.",
                                "properties":{
                                  "definition":{
                                    "title":"Definition",
                                    "type":"string"
                                  },
                                  "syntax":{
                                    "enum":[
                                      "lark",
                                      "regex"
                                    ],
                                    "title":"Syntax",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"grammar",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "definition",
                                  "syntax",
                                  "type"
                                ],
                                "title":"Grammar",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Format"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "type":{
                            "const":"custom",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "name",
                          "type"
                        ],
                        "title":"CustomTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Groups function/custom tools under a shared namespace.",
                        "properties":{
                          "description":{
                            "title":"Description",
                            "type":"string"
                          },
                          "name":{
                            "title":"Name",
                            "type":"string"
                          },
                          "tools":{
                            "items":{
                              "anyOf":[
                                {
                                  "additionalProperties":true,
                                  "properties":{
                                    "defer_loading":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Defer Loading"
                                    },
                                    "description":{
                                      "anyOf":[
                                        {
                                          "type":"string"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Description"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "parameters":{
                                      "anyOf":[
                                        {},
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Parameters"
                                    },
                                    "strict":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Strict"
                                    },
                                    "type":{
                                      "const":"function",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"ToolFunction",
                                  "type":"object"
                                },
                                {
                                  "additionalProperties":true,
                                  "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                                  "properties":{
                                    "defer_loading":{
                                      "anyOf":[
                                        {
                                          "type":"boolean"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Defer Loading"
                                    },
                                    "description":{
                                      "anyOf":[
                                        {
                                          "type":"string"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Description"
                                    },
                                    "format":{
                                      "anyOf":[
                                        {
                                          "additionalProperties":true,
                                          "description":"Unconstrained free-form text.",
                                          "properties":{
                                            "type":{
                                              "const":"text",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "type"
                                          ],
                                          "title":"Text",
                                          "type":"object"
                                        },
                                        {
                                          "additionalProperties":true,
                                          "description":"A grammar defined by the user.",
                                          "properties":{
                                            "definition":{
                                              "title":"Definition",
                                              "type":"string"
                                            },
                                            "syntax":{
                                              "enum":[
                                                "lark",
                                                "regex"
                                              ],
                                              "title":"Syntax",
                                              "type":"string"
                                            },
                                            "type":{
                                              "const":"grammar",
                                              "title":"Type",
                                              "type":"string"
                                            }
                                          },
                                          "required":[
                                            "definition",
                                            "syntax",
                                            "type"
                                          ],
                                          "title":"Grammar",
                                          "type":"object"
                                        },
                                        {
                                          "type":"null"
                                        }
                                      ],
                                      "title":"Format"
                                    },
                                    "name":{
                                      "title":"Name",
                                      "type":"string"
                                    },
                                    "type":{
                                      "const":"custom",
                                      "title":"Type",
                                      "type":"string"
                                    }
                                  },
                                  "required":[
                                    "name",
                                    "type"
                                  ],
                                  "title":"CustomTool",
                                  "type":"object"
                                }
                              ]
                            },
                            "title":"Tools",
                            "type":"array"
                          },
                          "type":{
                            "const":"namespace",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "description",
                          "name",
                          "tools",
                          "type"
                        ],
                        "title":"NamespaceTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Hosted or BYOT tool search configuration for deferred tools.",
                        "properties":{
                          "description":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Description"
                          },
                          "execution":{
                            "anyOf":[
                              {
                                "enum":[
                                  "server",
                                  "client"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Execution"
                          },
                          "parameters":{
                            "anyOf":[
                              {},
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Parameters"
                          },
                          "type":{
                            "const":"tool_search",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ToolSearchTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"This tool searches the web for relevant results to use in a response.\n\nLearn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
                        "properties":{
                          "search_content_types":{
                            "anyOf":[
                              {
                                "items":{
                                  "enum":[
                                    "text",
                                    "image"
                                  ],
                                  "type":"string"
                                },
                                "type":"array"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Search Content Types"
                          },
                          "search_context_size":{
                            "anyOf":[
                              {
                                "enum":[
                                  "low",
                                  "medium",
                                  "high"
                                ],
                                "type":"string"
                              },
                              {
                                "type":"null"
                              }
                            ],
                            "title":"Search Context Size"
                          },
                          "type":{
                            "enum":[
                              "web_search_preview",
                              "web_search_preview_2025_03_11"
                            ],
                            "title":"Type",
                            "type":"string"
                          },
                          "user_location":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "description":"The user's location.",
                                "properties":{
                                  "city":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"City"
                                  },
                                  "country":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Country"
                                  },
                                  "region":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Region"
                                  },
                                  "timezone":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Timezone"
                                  },
                                  "type":{
                                    "const":"approximate",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "type"
                                ],
                                "title":"UserLocation",
                                "type":"object"
                              },
                              {
                                "type":"null"
                              }
                            ]
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"WebSearchPreviewTool",
                        "type":"object"
                      },
                      {
                        "additionalProperties":true,
                        "description":"Allows the assistant to create, delete, or update files using unified diffs.",
                        "properties":{
                          "type":{
                            "const":"apply_patch",
                            "title":"Type",
                            "type":"string"
                          }
                        },
                        "required":[
                          "type"
                        ],
                        "title":"ApplyPatchTool",
                        "type":"object"
                      }
                    ]
                  },
                  "title":"Tools",
                  "type":"array"
                },
                "type":{
                  "const":"additional_tools",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "role",
                "tools",
                "type"
              ],
              "title":"AdditionalTools",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).",
              "properties":{
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "encrypted_content":{
                  "title":"Encrypted Content",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "type":{
                  "const":"compaction",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "encrypted_content",
                "type"
              ],
              "title":"ResponseCompactionItem",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"An image generation request made by the model.",
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "result":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Result"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "generating",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"image_generation_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "status",
                "type"
              ],
              "title":"ImageGenerationCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to run code.",
              "properties":{
                "code":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Code"
                },
                "container_id":{
                  "title":"Container Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "outputs":{
                  "anyOf":[
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"The logs output from the code interpreter.",
                            "properties":{
                              "logs":{
                                "title":"Logs",
                                "type":"string"
                              },
                              "type":{
                                "const":"logs",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "logs",
                              "type"
                            ],
                            "title":"OutputLogs",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"The image output from the code interpreter.",
                            "properties":{
                              "type":{
                                "const":"image",
                                "title":"Type",
                                "type":"string"
                              },
                              "url":{
                                "title":"Url",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type",
                              "url"
                            ],
                            "title":"OutputImage",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Outputs"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete",
                    "interpreting",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"code_interpreter_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "container_id",
                "status",
                "type"
              ],
              "title":"ResponseCodeInterpreterToolCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call to run a command on the local shell.",
              "properties":{
                "action":{
                  "additionalProperties":true,
                  "description":"Execute a shell command on the server.",
                  "properties":{
                    "command":{
                      "items":{
                        "type":"string"
                      },
                      "title":"Command",
                      "type":"array"
                    },
                    "env":{
                      "additionalProperties":{
                        "type":"string"
                      },
                      "title":"Env",
                      "type":"object"
                    },
                    "timeout_ms":{
                      "anyOf":[
                        {
                          "type":"integer"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Timeout Ms"
                    },
                    "type":{
                      "const":"exec",
                      "title":"Type",
                      "type":"string"
                    },
                    "user":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"User"
                    },
                    "working_directory":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Working Directory"
                    }
                  },
                  "required":[
                    "command",
                    "env",
                    "type"
                  ],
                  "title":"LocalShellCallAction",
                  "type":"object"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"local_shell_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "action",
                "call_id",
                "status",
                "type"
              ],
              "title":"LocalShellCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output of a local shell tool call.",
              "properties":{
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "output":{
                  "title":"Output",
                  "type":"string"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"local_shell_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "output",
                "type"
              ],
              "title":"LocalShellCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call that executes one or more shell commands in a managed environment.",
              "properties":{
                "action":{
                  "additionalProperties":true,
                  "description":"The shell commands and limits that describe how to run the tool call.",
                  "properties":{
                    "commands":{
                      "items":{
                        "type":"string"
                      },
                      "title":"Commands",
                      "type":"array"
                    },
                    "max_output_length":{
                      "anyOf":[
                        {
                          "type":"integer"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Max Output Length"
                    },
                    "timeout_ms":{
                      "anyOf":[
                        {
                          "type":"integer"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Timeout Ms"
                    }
                  },
                  "required":[
                    "commands"
                  ],
                  "title":"Action",
                  "type":"object"
                },
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "environment":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "description":"Represents the use of a local environment to perform shell actions.",
                      "properties":{
                        "type":{
                          "const":"local",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ResponseLocalEnvironment",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Represents a container created with /v1/containers.",
                      "properties":{
                        "container_id":{
                          "title":"Container Id",
                          "type":"string"
                        },
                        "type":{
                          "const":"container_reference",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "container_id",
                        "type"
                      ],
                      "title":"ResponseContainerReference",
                      "type":"object"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Environment"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"shell_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "action",
                "call_id",
                "status",
                "type"
              ],
              "title":"ResponseFunctionShellToolCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output of a shell tool call that was emitted.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "max_output_length":{
                  "anyOf":[
                    {
                      "type":"integer"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Max Output Length"
                },
                "output":{
                  "items":{
                    "additionalProperties":true,
                    "description":"The content of a shell tool call output that was emitted.",
                    "properties":{
                      "created_by":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Created By"
                      },
                      "outcome":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"Indicates that the shell call exceeded its configured time limit.",
                            "properties":{
                              "type":{
                                "const":"timeout",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"OutputOutcomeTimeout",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"Indicates that the shell commands finished and returned an exit code.",
                            "properties":{
                              "exit_code":{
                                "title":"Exit Code",
                                "type":"integer"
                              },
                              "type":{
                                "const":"exit",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "exit_code",
                              "type"
                            ],
                            "title":"OutputOutcomeExit",
                            "type":"object"
                          }
                        ],
                        "title":"Outcome"
                      },
                      "stderr":{
                        "title":"Stderr",
                        "type":"string"
                      },
                      "stdout":{
                        "title":"Stdout",
                        "type":"string"
                      }
                    },
                    "required":[
                      "outcome",
                      "stderr",
                      "stdout"
                    ],
                    "title":"Output",
                    "type":"object"
                  },
                  "title":"Output",
                  "type":"array"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"shell_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "call_id",
                "output",
                "status",
                "type"
              ],
              "title":"ResponseFunctionShellToolCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A tool call that applies file diffs by creating, deleting, or updating files.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "operation":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "description":"Instruction describing how to create a file via the apply_patch tool.",
                      "properties":{
                        "diff":{
                          "title":"Diff",
                          "type":"string"
                        },
                        "path":{
                          "title":"Path",
                          "type":"string"
                        },
                        "type":{
                          "const":"create_file",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "diff",
                        "path",
                        "type"
                      ],
                      "title":"OperationCreateFile",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Instruction describing how to delete a file via the apply_patch tool.",
                      "properties":{
                        "path":{
                          "title":"Path",
                          "type":"string"
                        },
                        "type":{
                          "const":"delete_file",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "path",
                        "type"
                      ],
                      "title":"OperationDeleteFile",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"Instruction describing how to update a file via the apply_patch tool.",
                      "properties":{
                        "diff":{
                          "title":"Diff",
                          "type":"string"
                        },
                        "path":{
                          "title":"Path",
                          "type":"string"
                        },
                        "type":{
                          "const":"update_file",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "diff",
                        "path",
                        "type"
                      ],
                      "title":"OperationUpdateFile",
                      "type":"object"
                    }
                  ],
                  "title":"Operation"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"apply_patch_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "call_id",
                "operation",
                "status",
                "type"
              ],
              "title":"ResponseApplyPatchToolCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output emitted by an apply patch tool call.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Output"
                },
                "status":{
                  "enum":[
                    "completed",
                    "failed"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"apply_patch_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "call_id",
                "status",
                "type"
              ],
              "title":"ResponseApplyPatchToolCallOutput",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"An invocation of a tool on an MCP server.",
              "properties":{
                "approval_request_id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Approval Request Id"
                },
                "arguments":{
                  "title":"Arguments",
                  "type":"string"
                },
                "error":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Error"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Output"
                },
                "server_label":{
                  "title":"Server Label",
                  "type":"string"
                },
                "status":{
                  "anyOf":[
                    {
                      "enum":[
                        "in_progress",
                        "completed",
                        "incomplete",
                        "calling",
                        "failed"
                      ],
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Status"
                },
                "type":{
                  "const":"mcp_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "arguments",
                "name",
                "server_label",
                "type"
              ],
              "title":"McpCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A list of tools available on an MCP server.",
              "properties":{
                "error":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Error"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "server_label":{
                  "title":"Server Label",
                  "type":"string"
                },
                "tools":{
                  "items":{
                    "additionalProperties":true,
                    "description":"A tool available on an MCP server.",
                    "properties":{
                      "annotations":{
                        "anyOf":[
                          {},
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Annotations"
                      },
                      "description":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Description"
                      },
                      "input_schema":{
                        "title":"Input Schema"
                      },
                      "name":{
                        "title":"Name",
                        "type":"string"
                      }
                    },
                    "required":[
                      "input_schema",
                      "name"
                    ],
                    "title":"McpListToolsTool",
                    "type":"object"
                  },
                  "title":"Tools",
                  "type":"array"
                },
                "type":{
                  "const":"mcp_list_tools",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "server_label",
                "tools",
                "type"
              ],
              "title":"McpListTools",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "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",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "arguments",
                "name",
                "server_label",
                "type"
              ],
              "title":"McpApprovalRequest",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A response to an MCP approval request.",
              "properties":{
                "approval_request_id":{
                  "title":"Approval Request Id",
                  "type":"string"
                },
                "approve":{
                  "title":"Approve",
                  "type":"boolean"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "reason":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Reason"
                },
                "type":{
                  "const":"mcp_approval_response",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "id",
                "approval_request_id",
                "approve",
                "type"
              ],
              "title":"McpApprovalResponse",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"A call to a custom tool created by the model.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "id":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Id"
                },
                "input":{
                  "title":"Input",
                  "type":"string"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "namespace":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Namespace"
                },
                "type":{
                  "const":"custom_tool_call",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "input",
                "name",
                "type"
              ],
              "title":"ResponseCustomToolCall",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "description":"The output of a custom tool call from your code, being sent back to the model.",
              "properties":{
                "call_id":{
                  "title":"Call Id",
                  "type":"string"
                },
                "created_by":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Created By"
                },
                "id":{
                  "title":"Id",
                  "type":"string"
                },
                "output":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"A text input to the model.",
                            "properties":{
                              "text":{
                                "title":"Text",
                                "type":"string"
                              },
                              "type":{
                                "const":"input_text",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "text",
                              "type"
                            ],
                            "title":"ResponseInputText",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision).",
                            "properties":{
                              "detail":{
                                "enum":[
                                  "low",
                                  "high",
                                  "auto",
                                  "original"
                                ],
                                "title":"Detail",
                                "type":"string"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "image_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Image Url"
                              },
                              "type":{
                                "const":"input_image",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "detail",
                              "type"
                            ],
                            "title":"ResponseInputImage",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A file input to the model.",
                            "properties":{
                              "detail":{
                                "anyOf":[
                                  {
                                    "enum":[
                                      "high",
                                      "low"
                                    ],
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Detail"
                              },
                              "file_data":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Data"
                              },
                              "file_id":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Id"
                              },
                              "file_url":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"File Url"
                              },
                              "filename":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"null"
                                  }
                                ],
                                "title":"Filename"
                              },
                              "type":{
                                "const":"input_file",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"ResponseInputFile",
                            "type":"object"
                          }
                        ]
                      },
                      "type":"array"
                    }
                  ],
                  "title":"Output"
                },
                "status":{
                  "enum":[
                    "in_progress",
                    "completed",
                    "incomplete"
                  ],
                  "title":"Status",
                  "type":"string"
                },
                "type":{
                  "const":"custom_tool_call_output",
                  "title":"Type",
                  "type":"string"
                }
              },
              "required":[
                "call_id",
                "output",
                "type",
                "id",
                "status"
              ],
              "title":"ResponseCustomToolCallOutputItem",
              "type":"object"
            },
            {
              "additionalProperties":true,
              "type":"object"
            }
          ]
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Input"
  },
  "instructions":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Instructions"
  },
  "logit_bias":{
    "anyOf":[
      {
        "additionalProperties":{
          "type":"number"
        },
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "title":"Logit Bias"
  },
  "max_output_tokens":{
    "anyOf":[
      {
        "exclusiveMinimum":0.0,
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Max Output Tokens"
  },
  "max_tool_calls":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Max Tool Calls"
  },
  "metadata":{
    "anyOf":[
      {
        "additionalProperties":{
          "type":"string"
        },
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "title":"Metadata"
  },
  "min_p":{
    "default":0.0,
    "title":"Min P",
    "type":"number"
  },
  "model":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Model"
  },
  "parallel_tool_calls":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Parallel Tool Calls"
  },
  "presence_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "title":"Presence Penalty"
  },
  "previous_response_id":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Previous Response Id"
  },
  "prompt":{
    "anyOf":[
      {
        "additionalProperties":true,
        "description":"Reference to a prompt template and its variables.\n[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).",
        "properties":{
          "id":{
            "title":"Id",
            "type":"string"
          },
          "variables":{
            "anyOf":[
              {
                "additionalProperties":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A text input to the model.",
                      "properties":{
                        "text":{
                          "title":"Text",
                          "type":"string"
                        },
                        "type":{
                          "const":"input_text",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "text",
                        "type"
                      ],
                      "title":"ResponseInputText",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision).",
                      "properties":{
                        "detail":{
                          "enum":[
                            "low",
                            "high",
                            "auto",
                            "original"
                          ],
                          "title":"Detail",
                          "type":"string"
                        },
                        "file_id":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"File Id"
                        },
                        "image_url":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Image Url"
                        },
                        "type":{
                          "const":"input_image",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "detail",
                        "type"
                      ],
                      "title":"ResponseInputImage",
                      "type":"object"
                    },
                    {
                      "additionalProperties":true,
                      "description":"A file input to the model.",
                      "properties":{
                        "detail":{
                          "anyOf":[
                            {
                              "enum":[
                                "high",
                                "low"
                              ],
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Detail"
                        },
                        "file_data":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"File Data"
                        },
                        "file_id":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"File Id"
                        },
                        "file_url":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"File Url"
                        },
                        "filename":{
                          "anyOf":[
                            {
                              "type":"string"
                            },
                            {
                              "type":"null"
                            }
                          ],
                          "title":"Filename"
                        },
                        "type":{
                          "const":"input_file",
                          "title":"Type",
                          "type":"string"
                        }
                      },
                      "required":[
                        "type"
                      ],
                      "title":"ResponseInputFile",
                      "type":"object"
                    }
                  ]
                },
                "type":"object"
              },
              {
                "type":"null"
              }
            ],
            "title":"Variables"
          },
          "version":{
            "anyOf":[
              {
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Version"
          }
        },
        "required":[
          "id"
        ],
        "title":"ResponsePrompt",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "prompt_cache_key":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Prompt Cache Key"
  },
  "prompt_cache_retention":{
    "anyOf":[
      {
        "enum":[
          "in-memory",
          "24h"
        ],
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Prompt Cache Retention"
  },
  "reasoning":{
    "anyOf":[
      {
        "additionalProperties":true,
        "description":"**gpt-5 and o-series models only**\n\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).",
        "properties":{
          "context":{
            "anyOf":[
              {
                "enum":[
                  "auto",
                  "current_turn",
                  "all_turns"
                ],
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Context"
          },
          "effort":{
            "anyOf":[
              {
                "enum":[
                  "none",
                  "minimal",
                  "low",
                  "medium",
                  "high",
                  "xhigh"
                ],
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Effort"
          },
          "generate_summary":{
            "anyOf":[
              {
                "enum":[
                  "auto",
                  "concise",
                  "detailed"
                ],
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Generate Summary"
          },
          "summary":{
            "anyOf":[
              {
                "enum":[
                  "auto",
                  "concise",
                  "detailed"
                ],
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Summary"
          }
        },
        "title":"Reasoning",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "repetition_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "title":"Repetition Penalty"
  },
  "request_id":{
    "title":"Request Id",
    "type":"string"
  },
  "safety_identifier":{
    "anyOf":[
      {
        "maxLength":64,
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Safety Identifier"
  },
  "seed":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Seed"
  },
  "service_tier":{
    "anyOf":[
      {
        "enum":[
          "auto",
          "default",
          "flex",
          "scale",
          "priority"
        ],
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "default":"auto",
    "title":"Service Tier"
  },
  "skip_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Skip Special Tokens"
  },
  "stop":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "title":"Stop"
  },
  "store":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Store"
  },
  "stream":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Stream"
  },
  "stream_options":{
    "anyOf":[
      {
        "additionalProperties":true,
        "description":"Options for streaming responses. Only set this when you set `stream: true`.",
        "properties":{
          "include_obfuscation":{
            "title":"Include Obfuscation",
            "type":"boolean"
          }
        },
        "title":"StreamOptions",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "temperature":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "title":"Temperature"
  },
  "text":{
    "anyOf":[
      {
        "additionalProperties":true,
        "description":"Configuration options for a text response from the model.\n\nCan be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n- [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)",
        "properties":{
          "format":{
            "anyOf":[
              {
                "additionalProperties":true,
                "description":"Default response format. Used to generate text responses.",
                "properties":{
                  "type":{
                    "const":"text",
                    "title":"Type",
                    "type":"string"
                  }
                },
                "required":[
                  "type"
                ],
                "title":"ResponseFormatText",
                "type":"object"
              },
              {
                "additionalProperties":true,
                "description":"JSON Schema response format.\n\nUsed to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).",
                "properties":{
                  "description":{
                    "anyOf":[
                      {
                        "type":"string"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "title":"Description"
                  },
                  "name":{
                    "title":"Name",
                    "type":"string"
                  },
                  "schema":{
                    "additionalProperties":true,
                    "title":"Schema",
                    "type":"object"
                  },
                  "strict":{
                    "anyOf":[
                      {
                        "type":"boolean"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "title":"Strict"
                  },
                  "type":{
                    "const":"json_schema",
                    "title":"Type",
                    "type":"string"
                  }
                },
                "required":[
                  "name",
                  "schema",
                  "type"
                ],
                "title":"ResponseFormatTextJSONSchemaConfig",
                "type":"object"
              },
              {
                "additionalProperties":true,
                "description":"JSON object response format.\n\nAn older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.",
                "properties":{
                  "type":{
                    "const":"json_object",
                    "title":"Type",
                    "type":"string"
                  }
                },
                "required":[
                  "type"
                ],
                "title":"ResponseFormatJSONObject",
                "type":"object"
              },
              {
                "type":"null"
              }
            ],
            "title":"Format"
          },
          "verbosity":{
            "anyOf":[
              {
                "enum":[
                  "low",
                  "medium",
                  "high"
                ],
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Verbosity"
          }
        },
        "title":"ResponseTextConfig",
        "type":"object"
      },
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "title":"Text"
  },
  "tool_choice":{
    "anyOf":[
      {
        "enum":[
          "none",
          "auto",
          "required"
        ],
        "type":"string"
      },
      {
        "additionalProperties":true,
        "description":"Constrains the tools available to the model to a pre-defined set.",
        "properties":{
          "mode":{
            "enum":[
              "auto",
              "required"
            ],
            "title":"Mode",
            "type":"string"
          },
          "tools":{
            "items":{
              "additionalProperties":true,
              "type":"object"
            },
            "title":"Tools",
            "type":"array"
          },
          "type":{
            "const":"allowed_tools",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "mode",
          "tools",
          "type"
        ],
        "title":"ToolChoiceAllowed",
        "type":"object"
      },
      {
        "additionalProperties":true,
        "description":"Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).",
        "properties":{
          "type":{
            "enum":[
              "file_search",
              "web_search_preview",
              "computer",
              "computer_use_preview",
              "computer_use",
              "web_search_preview_2025_03_11",
              "image_generation",
              "code_interpreter"
            ],
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "type"
        ],
        "title":"ToolChoiceTypes",
        "type":"object"
      },
      {
        "additionalProperties":true,
        "description":"Use this option to force the model to call a specific function.",
        "properties":{
          "name":{
            "title":"Name",
            "type":"string"
          },
          "type":{
            "const":"function",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "name",
          "type"
        ],
        "title":"ToolChoiceFunction",
        "type":"object"
      },
      {
        "additionalProperties":true,
        "description":"Use this option to force the model to call a specific tool on a remote MCP server.",
        "properties":{
          "name":{
            "anyOf":[
              {
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Name"
          },
          "server_label":{
            "title":"Server Label",
            "type":"string"
          },
          "type":{
            "const":"mcp",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "server_label",
          "type"
        ],
        "title":"ToolChoiceMcp",
        "type":"object"
      },
      {
        "additionalProperties":true,
        "description":"Use this option to force the model to call a specific custom tool.",
        "properties":{
          "name":{
            "title":"Name",
            "type":"string"
          },
          "type":{
            "const":"custom",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "name",
          "type"
        ],
        "title":"ToolChoiceCustom",
        "type":"object"
      },
      {
        "additionalProperties":true,
        "description":"Forces the model to call the apply_patch tool when executing a tool call.",
        "properties":{
          "type":{
            "const":"apply_patch",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "type"
        ],
        "title":"ToolChoiceApplyPatch",
        "type":"object"
      },
      {
        "additionalProperties":true,
        "description":"Forces the model to call the shell tool when a tool call is required.",
        "properties":{
          "type":{
            "const":"shell",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "type"
        ],
        "title":"ToolChoiceShell",
        "type":"object"
      }
    ],
    "default":"auto",
    "title":"Tool Choice"
  },
  "tools":{
    "items":{
      "anyOf":[
        {
          "additionalProperties":true,
          "description":"Defines a function in your own code the model can choose to call.\n\nLearn more about [function calling](https://platform.openai.com/docs/guides/function-calling).",
          "properties":{
            "defer_loading":{
              "anyOf":[
                {
                  "type":"boolean"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Defer Loading"
            },
            "description":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Description"
            },
            "name":{
              "title":"Name",
              "type":"string"
            },
            "parameters":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Parameters"
            },
            "strict":{
              "anyOf":[
                {
                  "type":"boolean"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Strict"
            },
            "type":{
              "const":"function",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "name",
            "type"
          ],
          "title":"FunctionTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A tool that searches for relevant content from uploaded files.\n\nLearn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).",
          "properties":{
            "filters":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                  "properties":{
                    "key":{
                      "title":"Key",
                      "type":"string"
                    },
                    "type":{
                      "enum":[
                        "eq",
                        "ne",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "in",
                        "nin"
                      ],
                      "title":"Type",
                      "type":"string"
                    },
                    "value":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"number"
                        },
                        {
                          "type":"boolean"
                        },
                        {
                          "items":{
                            "anyOf":[
                              {
                                "type":"string"
                              },
                              {
                                "type":"number"
                              }
                            ]
                          },
                          "type":"array"
                        }
                      ],
                      "title":"Value"
                    }
                  },
                  "required":[
                    "key",
                    "type",
                    "value"
                  ],
                  "title":"ComparisonFilter",
                  "type":"object"
                },
                {
                  "additionalProperties":true,
                  "description":"Combine multiple filters using `and` or `or`.",
                  "properties":{
                    "filters":{
                      "items":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.",
                            "properties":{
                              "key":{
                                "title":"Key",
                                "type":"string"
                              },
                              "type":{
                                "enum":[
                                  "eq",
                                  "ne",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "in",
                                  "nin"
                                ],
                                "title":"Type",
                                "type":"string"
                              },
                              "value":{
                                "anyOf":[
                                  {
                                    "type":"string"
                                  },
                                  {
                                    "type":"number"
                                  },
                                  {
                                    "type":"boolean"
                                  },
                                  {
                                    "items":{
                                      "anyOf":[
                                        {
                                          "type":"string"
                                        },
                                        {
                                          "type":"number"
                                        }
                                      ]
                                    },
                                    "type":"array"
                                  }
                                ],
                                "title":"Value"
                              }
                            },
                            "required":[
                              "key",
                              "type",
                              "value"
                            ],
                            "title":"ComparisonFilter",
                            "type":"object"
                          },
                          {}
                        ]
                      },
                      "title":"Filters",
                      "type":"array"
                    },
                    "type":{
                      "enum":[
                        "and",
                        "or"
                      ],
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "filters",
                    "type"
                  ],
                  "title":"CompoundFilter",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Filters"
            },
            "max_num_results":{
              "anyOf":[
                {
                  "type":"integer"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Max Num Results"
            },
            "ranking_options":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"Ranking options for search.",
                  "properties":{
                    "hybrid_search":{
                      "anyOf":[
                        {
                          "additionalProperties":true,
                          "description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.",
                          "properties":{
                            "embedding_weight":{
                              "title":"Embedding Weight",
                              "type":"number"
                            },
                            "text_weight":{
                              "title":"Text Weight",
                              "type":"number"
                            }
                          },
                          "required":[
                            "embedding_weight",
                            "text_weight"
                          ],
                          "title":"RankingOptionsHybridSearch",
                          "type":"object"
                        },
                        {
                          "type":"null"
                        }
                      ]
                    },
                    "ranker":{
                      "anyOf":[
                        {
                          "enum":[
                            "auto",
                            "default-2024-11-15"
                          ],
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Ranker"
                    },
                    "score_threshold":{
                      "anyOf":[
                        {
                          "type":"number"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Score Threshold"
                    }
                  },
                  "title":"RankingOptions",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ]
            },
            "type":{
              "const":"file_search",
              "title":"Type",
              "type":"string"
            },
            "vector_store_ids":{
              "items":{
                "type":"string"
              },
              "title":"Vector Store Ids",
              "type":"array"
            }
          },
          "required":[
            "type",
            "vector_store_ids"
          ],
          "title":"FileSearchTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
          "properties":{
            "type":{
              "const":"computer",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "type"
          ],
          "title":"ComputerTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).",
          "properties":{
            "display_height":{
              "title":"Display Height",
              "type":"integer"
            },
            "display_width":{
              "title":"Display Width",
              "type":"integer"
            },
            "environment":{
              "enum":[
                "windows",
                "mac",
                "linux",
                "ubuntu",
                "browser"
              ],
              "title":"Environment",
              "type":"string"
            },
            "type":{
              "const":"computer_use_preview",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "display_height",
            "display_width",
            "environment",
            "type"
          ],
          "title":"ComputerUsePreviewTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"Search the Internet for sources related to the prompt.\n\nLearn more about the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
          "properties":{
            "filters":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"Filters for the search.",
                  "properties":{
                    "allowed_domains":{
                      "anyOf":[
                        {
                          "items":{
                            "type":"string"
                          },
                          "type":"array"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Allowed Domains"
                    }
                  },
                  "title":"Filters",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ]
            },
            "search_context_size":{
              "anyOf":[
                {
                  "enum":[
                    "low",
                    "medium",
                    "high"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Search Context Size"
            },
            "type":{
              "enum":[
                "web_search",
                "web_search_2025_08_26"
              ],
              "title":"Type",
              "type":"string"
            },
            "user_location":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"The approximate location of the user.",
                  "properties":{
                    "city":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"City"
                    },
                    "country":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Country"
                    },
                    "region":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Region"
                    },
                    "timezone":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Timezone"
                    },
                    "type":{
                      "anyOf":[
                        {
                          "const":"approximate",
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Type"
                    }
                  },
                  "title":"UserLocation",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ]
            }
          },
          "required":[
            "type"
          ],
          "title":"WebSearchTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).",
          "properties":{
            "allowed_tools":{
              "anyOf":[
                {
                  "items":{
                    "type":"string"
                  },
                  "type":"array"
                },
                {
                  "additionalProperties":true,
                  "description":"A filter object to specify which tools are allowed.",
                  "properties":{
                    "read_only":{
                      "anyOf":[
                        {
                          "type":"boolean"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Read Only"
                    },
                    "tool_names":{
                      "anyOf":[
                        {
                          "items":{
                            "type":"string"
                          },
                          "type":"array"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Tool Names"
                    }
                  },
                  "title":"McpAllowedToolsMcpToolFilter",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Allowed Tools"
            },
            "authorization":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Authorization"
            },
            "connector_id":{
              "anyOf":[
                {
                  "enum":[
                    "connector_dropbox",
                    "connector_gmail",
                    "connector_googlecalendar",
                    "connector_googledrive",
                    "connector_microsoftteams",
                    "connector_outlookcalendar",
                    "connector_outlookemail",
                    "connector_sharepoint"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Connector Id"
            },
            "defer_loading":{
              "anyOf":[
                {
                  "type":"boolean"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Defer Loading"
            },
            "headers":{
              "anyOf":[
                {
                  "additionalProperties":{
                    "type":"string"
                  },
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Headers"
            },
            "require_approval":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"Specify which of the MCP server's tools require approval.\n\nCan be\n`always`, `never`, or a filter object associated with tools\nthat require approval.",
                  "properties":{
                    "always":{
                      "anyOf":[
                        {
                          "additionalProperties":true,
                          "description":"A filter object to specify which tools are allowed.",
                          "properties":{
                            "read_only":{
                              "anyOf":[
                                {
                                  "type":"boolean"
                                },
                                {
                                  "type":"null"
                                }
                              ],
                              "title":"Read Only"
                            },
                            "tool_names":{
                              "anyOf":[
                                {
                                  "items":{
                                    "type":"string"
                                  },
                                  "type":"array"
                                },
                                {
                                  "type":"null"
                                }
                              ],
                              "title":"Tool Names"
                            }
                          },
                          "title":"McpRequireApprovalMcpToolApprovalFilterAlways",
                          "type":"object"
                        },
                        {
                          "type":"null"
                        }
                      ]
                    },
                    "never":{
                      "anyOf":[
                        {
                          "additionalProperties":true,
                          "description":"A filter object to specify which tools are allowed.",
                          "properties":{
                            "read_only":{
                              "anyOf":[
                                {
                                  "type":"boolean"
                                },
                                {
                                  "type":"null"
                                }
                              ],
                              "title":"Read Only"
                            },
                            "tool_names":{
                              "anyOf":[
                                {
                                  "items":{
                                    "type":"string"
                                  },
                                  "type":"array"
                                },
                                {
                                  "type":"null"
                                }
                              ],
                              "title":"Tool Names"
                            }
                          },
                          "title":"McpRequireApprovalMcpToolApprovalFilterNever",
                          "type":"object"
                        },
                        {
                          "type":"null"
                        }
                      ]
                    }
                  },
                  "title":"McpRequireApprovalMcpToolApprovalFilter",
                  "type":"object"
                },
                {
                  "enum":[
                    "always",
                    "never"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Require Approval"
            },
            "server_description":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Server Description"
            },
            "server_label":{
              "title":"Server Label",
              "type":"string"
            },
            "server_url":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Server Url"
            },
            "tunnel_id":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Tunnel Id"
            },
            "type":{
              "const":"mcp",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "server_label",
            "type"
          ],
          "title":"Mcp",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A tool that runs Python code to help generate a response to a prompt.",
          "properties":{
            "container":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "additionalProperties":true,
                  "description":"Configuration for a code interpreter container.\n\nOptionally specify the IDs of the files to run the code on.",
                  "properties":{
                    "file_ids":{
                      "anyOf":[
                        {
                          "items":{
                            "type":"string"
                          },
                          "type":"array"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"File Ids"
                    },
                    "memory_limit":{
                      "anyOf":[
                        {
                          "enum":[
                            "1g",
                            "4g",
                            "16g",
                            "64g"
                          ],
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Memory Limit"
                    },
                    "network_policy":{
                      "anyOf":[
                        {
                          "additionalProperties":true,
                          "properties":{
                            "type":{
                              "const":"disabled",
                              "title":"Type",
                              "type":"string"
                            }
                          },
                          "required":[
                            "type"
                          ],
                          "title":"ContainerNetworkPolicyDisabled",
                          "type":"object"
                        },
                        {
                          "additionalProperties":true,
                          "properties":{
                            "allowed_domains":{
                              "items":{
                                "type":"string"
                              },
                              "title":"Allowed Domains",
                              "type":"array"
                            },
                            "domain_secrets":{
                              "anyOf":[
                                {
                                  "items":{
                                    "additionalProperties":true,
                                    "properties":{
                                      "domain":{
                                        "title":"Domain",
                                        "type":"string"
                                      },
                                      "name":{
                                        "title":"Name",
                                        "type":"string"
                                      },
                                      "value":{
                                        "title":"Value",
                                        "type":"string"
                                      }
                                    },
                                    "required":[
                                      "domain",
                                      "name",
                                      "value"
                                    ],
                                    "title":"ContainerNetworkPolicyDomainSecret",
                                    "type":"object"
                                  },
                                  "type":"array"
                                },
                                {
                                  "type":"null"
                                }
                              ],
                              "title":"Domain Secrets"
                            },
                            "type":{
                              "const":"allowlist",
                              "title":"Type",
                              "type":"string"
                            }
                          },
                          "required":[
                            "allowed_domains",
                            "type"
                          ],
                          "title":"ContainerNetworkPolicyAllowlist",
                          "type":"object"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Network Policy"
                    },
                    "type":{
                      "const":"auto",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "type"
                  ],
                  "title":"CodeInterpreterContainerCodeInterpreterToolAuto",
                  "type":"object"
                }
              ],
              "title":"Container"
            },
            "type":{
              "const":"code_interpreter",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "container",
            "type"
          ],
          "title":"CodeInterpreter",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A tool that generates images using the GPT image models.",
          "properties":{
            "action":{
              "anyOf":[
                {
                  "enum":[
                    "generate",
                    "edit",
                    "auto"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Action"
            },
            "background":{
              "anyOf":[
                {
                  "enum":[
                    "transparent",
                    "opaque",
                    "auto"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Background"
            },
            "input_fidelity":{
              "anyOf":[
                {
                  "enum":[
                    "high",
                    "low"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Input Fidelity"
            },
            "input_image_mask":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"Optional mask for inpainting.\n\nContains `image_url`\n(string, optional) and `file_id` (string, optional).",
                  "properties":{
                    "file_id":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"File Id"
                    },
                    "image_url":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Image Url"
                    }
                  },
                  "title":"ImageGenerationInputImageMask",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ]
            },
            "model":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "enum":[
                    "gpt-image-1",
                    "gpt-image-1-mini",
                    "gpt-image-2",
                    "gpt-image-2-2026-04-21",
                    "gpt-image-1.5",
                    "chatgpt-image-latest"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Model"
            },
            "moderation":{
              "anyOf":[
                {
                  "enum":[
                    "auto",
                    "low"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Moderation"
            },
            "output_compression":{
              "anyOf":[
                {
                  "type":"integer"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Output Compression"
            },
            "output_format":{
              "anyOf":[
                {
                  "enum":[
                    "png",
                    "webp",
                    "jpeg"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Output Format"
            },
            "partial_images":{
              "anyOf":[
                {
                  "type":"integer"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Partial Images"
            },
            "quality":{
              "anyOf":[
                {
                  "enum":[
                    "low",
                    "medium",
                    "high",
                    "auto"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Quality"
            },
            "size":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "enum":[
                    "1024x1024",
                    "1024x1536",
                    "1536x1024",
                    "auto"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Size"
            },
            "type":{
              "const":"image_generation",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "type"
          ],
          "title":"ImageGeneration",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A tool that allows the model to execute shell commands in a local environment.",
          "properties":{
            "type":{
              "const":"local_shell",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "type"
          ],
          "title":"LocalShell",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A tool that allows the model to execute shell commands.",
          "properties":{
            "environment":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "properties":{
                    "file_ids":{
                      "anyOf":[
                        {
                          "items":{
                            "type":"string"
                          },
                          "type":"array"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"File Ids"
                    },
                    "memory_limit":{
                      "anyOf":[
                        {
                          "enum":[
                            "1g",
                            "4g",
                            "16g",
                            "64g"
                          ],
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Memory Limit"
                    },
                    "network_policy":{
                      "anyOf":[
                        {
                          "additionalProperties":true,
                          "properties":{
                            "type":{
                              "const":"disabled",
                              "title":"Type",
                              "type":"string"
                            }
                          },
                          "required":[
                            "type"
                          ],
                          "title":"ContainerNetworkPolicyDisabled",
                          "type":"object"
                        },
                        {
                          "additionalProperties":true,
                          "properties":{
                            "allowed_domains":{
                              "items":{
                                "type":"string"
                              },
                              "title":"Allowed Domains",
                              "type":"array"
                            },
                            "domain_secrets":{
                              "anyOf":[
                                {
                                  "items":{
                                    "additionalProperties":true,
                                    "properties":{
                                      "domain":{
                                        "title":"Domain",
                                        "type":"string"
                                      },
                                      "name":{
                                        "title":"Name",
                                        "type":"string"
                                      },
                                      "value":{
                                        "title":"Value",
                                        "type":"string"
                                      }
                                    },
                                    "required":[
                                      "domain",
                                      "name",
                                      "value"
                                    ],
                                    "title":"ContainerNetworkPolicyDomainSecret",
                                    "type":"object"
                                  },
                                  "type":"array"
                                },
                                {
                                  "type":"null"
                                }
                              ],
                              "title":"Domain Secrets"
                            },
                            "type":{
                              "const":"allowlist",
                              "title":"Type",
                              "type":"string"
                            }
                          },
                          "required":[
                            "allowed_domains",
                            "type"
                          ],
                          "title":"ContainerNetworkPolicyAllowlist",
                          "type":"object"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Network Policy"
                    },
                    "skills":{
                      "anyOf":[
                        {
                          "items":{
                            "anyOf":[
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "skill_id":{
                                    "title":"Skill Id",
                                    "type":"string"
                                  },
                                  "type":{
                                    "const":"skill_reference",
                                    "title":"Type",
                                    "type":"string"
                                  },
                                  "version":{
                                    "anyOf":[
                                      {
                                        "type":"string"
                                      },
                                      {
                                        "type":"null"
                                      }
                                    ],
                                    "title":"Version"
                                  }
                                },
                                "required":[
                                  "skill_id",
                                  "type"
                                ],
                                "title":"SkillReference",
                                "type":"object"
                              },
                              {
                                "additionalProperties":true,
                                "properties":{
                                  "description":{
                                    "title":"Description",
                                    "type":"string"
                                  },
                                  "name":{
                                    "title":"Name",
                                    "type":"string"
                                  },
                                  "source":{
                                    "additionalProperties":true,
                                    "description":"Inline skill payload",
                                    "properties":{
                                      "data":{
                                        "title":"Data",
                                        "type":"string"
                                      },
                                      "media_type":{
                                        "const":"application/zip",
                                        "title":"Media Type",
                                        "type":"string"
                                      },
                                      "type":{
                                        "const":"base64",
                                        "title":"Type",
                                        "type":"string"
                                      }
                                    },
                                    "required":[
                                      "data",
                                      "media_type",
                                      "type"
                                    ],
                                    "title":"InlineSkillSource",
                                    "type":"object"
                                  },
                                  "type":{
                                    "const":"inline",
                                    "title":"Type",
                                    "type":"string"
                                  }
                                },
                                "required":[
                                  "description",
                                  "name",
                                  "source",
                                  "type"
                                ],
                                "title":"InlineSkill",
                                "type":"object"
                              }
                            ]
                          },
                          "type":"array"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Skills"
                    },
                    "type":{
                      "const":"container_auto",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "type"
                  ],
                  "title":"ContainerAuto",
                  "type":"object"
                },
                {
                  "additionalProperties":true,
                  "properties":{
                    "skills":{
                      "anyOf":[
                        {
                          "items":{
                            "additionalProperties":true,
                            "properties":{
                              "description":{
                                "title":"Description",
                                "type":"string"
                              },
                              "name":{
                                "title":"Name",
                                "type":"string"
                              },
                              "path":{
                                "title":"Path",
                                "type":"string"
                              }
                            },
                            "required":[
                              "description",
                              "name",
                              "path"
                            ],
                            "title":"LocalSkill",
                            "type":"object"
                          },
                          "type":"array"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Skills"
                    },
                    "type":{
                      "const":"local",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "type"
                  ],
                  "title":"LocalEnvironment",
                  "type":"object"
                },
                {
                  "additionalProperties":true,
                  "properties":{
                    "container_id":{
                      "title":"Container Id",
                      "type":"string"
                    },
                    "type":{
                      "const":"container_reference",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "container_id",
                    "type"
                  ],
                  "title":"ContainerReference",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Environment"
            },
            "type":{
              "const":"shell",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "type"
          ],
          "title":"FunctionShellTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
          "properties":{
            "defer_loading":{
              "anyOf":[
                {
                  "type":"boolean"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Defer Loading"
            },
            "description":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Description"
            },
            "format":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"Unconstrained free-form text.",
                  "properties":{
                    "type":{
                      "const":"text",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "type"
                  ],
                  "title":"Text",
                  "type":"object"
                },
                {
                  "additionalProperties":true,
                  "description":"A grammar defined by the user.",
                  "properties":{
                    "definition":{
                      "title":"Definition",
                      "type":"string"
                    },
                    "syntax":{
                      "enum":[
                        "lark",
                        "regex"
                      ],
                      "title":"Syntax",
                      "type":"string"
                    },
                    "type":{
                      "const":"grammar",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "definition",
                    "syntax",
                    "type"
                  ],
                  "title":"Grammar",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Format"
            },
            "name":{
              "title":"Name",
              "type":"string"
            },
            "type":{
              "const":"custom",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "name",
            "type"
          ],
          "title":"CustomTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"Groups function/custom tools under a shared namespace.",
          "properties":{
            "description":{
              "title":"Description",
              "type":"string"
            },
            "name":{
              "title":"Name",
              "type":"string"
            },
            "tools":{
              "items":{
                "anyOf":[
                  {
                    "additionalProperties":true,
                    "properties":{
                      "defer_loading":{
                        "anyOf":[
                          {
                            "type":"boolean"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Defer Loading"
                      },
                      "description":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Description"
                      },
                      "name":{
                        "title":"Name",
                        "type":"string"
                      },
                      "parameters":{
                        "anyOf":[
                          {},
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Parameters"
                      },
                      "strict":{
                        "anyOf":[
                          {
                            "type":"boolean"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Strict"
                      },
                      "type":{
                        "const":"function",
                        "title":"Type",
                        "type":"string"
                      }
                    },
                    "required":[
                      "name",
                      "type"
                    ],
                    "title":"ToolFunction",
                    "type":"object"
                  },
                  {
                    "additionalProperties":true,
                    "description":"A custom tool that processes input using a specified format.\n\nLearn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)",
                    "properties":{
                      "defer_loading":{
                        "anyOf":[
                          {
                            "type":"boolean"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Defer Loading"
                      },
                      "description":{
                        "anyOf":[
                          {
                            "type":"string"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Description"
                      },
                      "format":{
                        "anyOf":[
                          {
                            "additionalProperties":true,
                            "description":"Unconstrained free-form text.",
                            "properties":{
                              "type":{
                                "const":"text",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "type"
                            ],
                            "title":"Text",
                            "type":"object"
                          },
                          {
                            "additionalProperties":true,
                            "description":"A grammar defined by the user.",
                            "properties":{
                              "definition":{
                                "title":"Definition",
                                "type":"string"
                              },
                              "syntax":{
                                "enum":[
                                  "lark",
                                  "regex"
                                ],
                                "title":"Syntax",
                                "type":"string"
                              },
                              "type":{
                                "const":"grammar",
                                "title":"Type",
                                "type":"string"
                              }
                            },
                            "required":[
                              "definition",
                              "syntax",
                              "type"
                            ],
                            "title":"Grammar",
                            "type":"object"
                          },
                          {
                            "type":"null"
                          }
                        ],
                        "title":"Format"
                      },
                      "name":{
                        "title":"Name",
                        "type":"string"
                      },
                      "type":{
                        "const":"custom",
                        "title":"Type",
                        "type":"string"
                      }
                    },
                    "required":[
                      "name",
                      "type"
                    ],
                    "title":"CustomTool",
                    "type":"object"
                  }
                ]
              },
              "title":"Tools",
              "type":"array"
            },
            "type":{
              "const":"namespace",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "description",
            "name",
            "tools",
            "type"
          ],
          "title":"NamespaceTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"Hosted or BYOT tool search configuration for deferred tools.",
          "properties":{
            "description":{
              "anyOf":[
                {
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Description"
            },
            "execution":{
              "anyOf":[
                {
                  "enum":[
                    "server",
                    "client"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Execution"
            },
            "parameters":{
              "anyOf":[
                {},
                {
                  "type":"null"
                }
              ],
              "title":"Parameters"
            },
            "type":{
              "const":"tool_search",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "type"
          ],
          "title":"ToolSearchTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"This tool searches the web for relevant results to use in a response.\n\nLearn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).",
          "properties":{
            "search_content_types":{
              "anyOf":[
                {
                  "items":{
                    "enum":[
                      "text",
                      "image"
                    ],
                    "type":"string"
                  },
                  "type":"array"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Search Content Types"
            },
            "search_context_size":{
              "anyOf":[
                {
                  "enum":[
                    "low",
                    "medium",
                    "high"
                  ],
                  "type":"string"
                },
                {
                  "type":"null"
                }
              ],
              "title":"Search Context Size"
            },
            "type":{
              "enum":[
                "web_search_preview",
                "web_search_preview_2025_03_11"
              ],
              "title":"Type",
              "type":"string"
            },
            "user_location":{
              "anyOf":[
                {
                  "additionalProperties":true,
                  "description":"The user's location.",
                  "properties":{
                    "city":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"City"
                    },
                    "country":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Country"
                    },
                    "region":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Region"
                    },
                    "timezone":{
                      "anyOf":[
                        {
                          "type":"string"
                        },
                        {
                          "type":"null"
                        }
                      ],
                      "title":"Timezone"
                    },
                    "type":{
                      "const":"approximate",
                      "title":"Type",
                      "type":"string"
                    }
                  },
                  "required":[
                    "type"
                  ],
                  "title":"UserLocation",
                  "type":"object"
                },
                {
                  "type":"null"
                }
              ]
            }
          },
          "required":[
            "type"
          ],
          "title":"WebSearchPreviewTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "description":"Allows the assistant to create, delete, or update files using unified diffs.",
          "properties":{
            "type":{
              "const":"apply_patch",
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "type"
          ],
          "title":"ApplyPatchTool",
          "type":"object"
        },
        {
          "additionalProperties":true,
          "type":"object"
        }
      ]
    },
    "title":"Tools",
    "type":"array"
  },
  "top_k":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":40,
    "title":"Top K"
  },
  "top_logprobs":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Top Logprobs"
  },
  "top_p":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "title":"Top P"
  },
  "truncation":{
    "anyOf":[
      {
        "enum":[
          "auto",
          "disabled"
        ],
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "default":"disabled",
    "title":"Truncation"
  },
  "user":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"User"
  }
}
Status Codes:

Proxy 服务器接口#

POST /distserve/connection_warmup#

Connection Warmup

Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /distserve/gc#

Cache Block Gc To Be Migrated

Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /nodes/add#

Add Node

Add a node to the manager.

  • url (str): A http url. Can be the url generated by lmdeploy serve api_server.

  • status (dict): The description of the node. An example: {models: ['internlm-chat-7b],  speed: 1}. The speed here can be RPM or other metric. All the values of nodes should be the same metric.

Request body:

{
  "status":{
    "anyOf":[
      {
        "description":"Status protocol consists of models' information.",
        "properties":{
          "latency":{
            "default":[],
            "examples":[
              []
            ],
            "items":{},
            "title":"Latency",
            "type":"array"
          },
          "models":{
            "default":[],
            "examples":[
              []
            ],
            "items":{
              "type":"string"
            },
            "title":"Models",
            "type":"array"
          },
          "role":{
            "description":"Role of Engine.\n\nNote: In the implementation of LMDeploy-Distserve, all engine is hybrid\n    engine technically, the role of engine is up to what kind of request is\n    sent to the engine. However, taking implementation into the consideration,\n    the role is still need to be identified when starting the engine server\n    for the following reasons:\n        1. Make sure the engine can be correctly discovered by the proxy.\n        2. The create of ModelInputs is different among hybrid, prefill and\n            decode engines in DP Engine (DSV3 DP + EP).",
            "enum":[
              1,
              2,
              3
            ],
            "title":"EngineRole",
            "type":"integer"
          },
          "speed":{
            "anyOf":[
              {
                "type":"integer"
              },
              {
                "type":"null"
              }
            ],
            "examples":[
              null
            ],
            "title":"Speed"
          },
          "unfinished":{
            "default":0,
            "title":"Unfinished",
            "type":"integer"
          }
        },
        "title":"Status",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "url":{
    "title":"Url",
    "type":"string"
  }
}

Example request:

POST /nodes/add HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "status": {
        "latency": [
            {}
        ],
        "models": [
            "string"
        ],
        "role": 1,
        "speed": 1,
        "unfinished": 1
    },
    "url": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /nodes/remove#

Remove Node

Show available models.

Request body:

{
  "status":{
    "anyOf":[
      {
        "description":"Status protocol consists of models' information.",
        "properties":{
          "latency":{
            "default":[],
            "examples":[
              []
            ],
            "items":{},
            "title":"Latency",
            "type":"array"
          },
          "models":{
            "default":[],
            "examples":[
              []
            ],
            "items":{
              "type":"string"
            },
            "title":"Models",
            "type":"array"
          },
          "role":{
            "description":"Role of Engine.\n\nNote: In the implementation of LMDeploy-Distserve, all engine is hybrid\n    engine technically, the role of engine is up to what kind of request is\n    sent to the engine. However, taking implementation into the consideration,\n    the role is still need to be identified when starting the engine server\n    for the following reasons:\n        1. Make sure the engine can be correctly discovered by the proxy.\n        2. The create of ModelInputs is different among hybrid, prefill and\n            decode engines in DP Engine (DSV3 DP + EP).",
            "enum":[
              1,
              2,
              3
            ],
            "title":"EngineRole",
            "type":"integer"
          },
          "speed":{
            "anyOf":[
              {
                "type":"integer"
              },
              {
                "type":"null"
              }
            ],
            "examples":[
              null
            ],
            "title":"Speed"
          },
          "unfinished":{
            "default":0,
            "title":"Unfinished",
            "type":"integer"
          }
        },
        "title":"Status",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "url":{
    "title":"Url",
    "type":"string"
  }
}

Example request:

POST /nodes/remove HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "status": {
        "latency": [
            {}
        ],
        "models": [
            "string"
        ],
        "role": 1,
        "speed": 1,
        "unfinished": 1
    },
    "url": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

GET /nodes/status#

Node Status

Show nodes status.

Example request:

GET /nodes/status HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /nodes/terminate#

Terminate Node

Terminate nodes.

Request body:

{
  "status":{
    "anyOf":[
      {
        "description":"Status protocol consists of models' information.",
        "properties":{
          "latency":{
            "default":[],
            "examples":[
              []
            ],
            "items":{},
            "title":"Latency",
            "type":"array"
          },
          "models":{
            "default":[],
            "examples":[
              []
            ],
            "items":{
              "type":"string"
            },
            "title":"Models",
            "type":"array"
          },
          "role":{
            "description":"Role of Engine.\n\nNote: In the implementation of LMDeploy-Distserve, all engine is hybrid\n    engine technically, the role of engine is up to what kind of request is\n    sent to the engine. However, taking implementation into the consideration,\n    the role is still need to be identified when starting the engine server\n    for the following reasons:\n        1. Make sure the engine can be correctly discovered by the proxy.\n        2. The create of ModelInputs is different among hybrid, prefill and\n            decode engines in DP Engine (DSV3 DP + EP).",
            "enum":[
              1,
              2,
              3
            ],
            "title":"EngineRole",
            "type":"integer"
          },
          "speed":{
            "anyOf":[
              {
                "type":"integer"
              },
              {
                "type":"null"
              }
            ],
            "examples":[
              null
            ],
            "title":"Speed"
          },
          "unfinished":{
            "default":0,
            "title":"Unfinished",
            "type":"integer"
          }
        },
        "title":"Status",
        "type":"object"
      },
      {
        "type":"null"
      }
    ]
  },
  "url":{
    "title":"Url",
    "type":"string"
  }
}

Example request:

POST /nodes/terminate HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "status": {
        "latency": [
            {}
        ],
        "models": [
            "string"
        ],
        "role": 1,
        "speed": 1,
        "unfinished": 1
    },
    "url": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

GET /nodes/terminate_all#

Terminate Node All

Terminate nodes.

Example request:

GET /nodes/terminate_all HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

POST /v1/chat/completions#

Chat Completions V1

Completion API similar to OpenAI’s API.

Refer to https://platform.openai.com/docs/api-reference/chat/create for the API specification.

The request should be a JSON object with the following fields:

  • model: model name. Available from /v1/models.

  • messages: string prompt or chat history in OpenAI format. Chat history example: [{“role”: “user”, “content”: “hi”}].

  • temperature (float): to modulate the next token probability

  • top_p (float): If set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are kept for generation.

  • n (int): How many chat completion choices to generate for each input message. Only support one here.

  • stream: whether to stream the results or not. Default to false.

  • max_completion_tokens (int | None): output token nums. Default to None.

  • max_tokens (int | None): output token nums. Default to None. Deprecated: Use max_completion_tokens instead.

  • repetition_penalty (float): The parameter for repetition penalty. 1.0 means no penalty

  • stop (str | list[str] | None): To stop generating further tokens. Only accept stop words that’s encoded to one token idex.

  • response_format (dict | None): To generate response according to given schema. Examples:

    {
      "type": "json_schema",
      "json_schema":{
        "name": "test",
        "schema":{
          "properties":{
            "name":{"type":"string"}
          },
          "required":["name"],
          "type":"object"
        }
      }
    }
    

    or {"type": "regex_schema", "regex_schema": "call me [A-Za-z]{1,10}"}

  • logit_bias (dict): Bias to logits. Only supported in pytorch engine.

  • tools (list): A list of tools the model may call. Currently, only internlm2 functions are supported as a tool. Use this to specify a list of functions for which the model can generate JSON inputs.

  • tool_choice (str | object): Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. auto or required will put all the tools information to the model.

Additional arguments supported by LMDeploy:

  • top_k (int): The number of the highest probability vocabulary tokens to keep for top-k-filtering

  • ignore_eos (bool): indicator for ignoring eos

  • skip_special_tokens (bool): Whether or not to remove special tokens in the decoding. Default to be True.

  • min_new_tokens (int): To generate at least numbers of tokens.

  • min_p (float): Minimum token probability, which will be scaled by the probability of the most likely token. It must be a value between 0 and 1. Typical values are in the 0.01-0.2 range, comparably selective as setting top_p in the 0.99-0.8 range (use the opposite of normal top_p values)

Currently we do not support the following features:

  • presence_penalty (replaced with repetition_penalty)

  • frequency_penalty (replaced with repetition_penalty)

Request body:

{
  "chat_template_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
    "title":"Chat Template Kwargs"
  },
  "do_preprocess":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Do Preprocess"
  },
  "enable_thinking":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "title":"Enable Thinking"
  },
  "frequency_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Frequency Penalty"
  },
  "ignore_eos":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Ignore Eos"
  },
  "image_data":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "items":{
          "anyOf":[
            {
              "type":"string"
            },
            {
              "additionalProperties":true,
              "type":"object"
            }
          ]
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "description":"Image data for multimodal input. Only used alongside input_ids when messages is empty. Mutually exclusive with non-empty messages. Can be a URL/base64 string, a dict, or a list of these.",
    "examples":[
      null
    ],
    "title":"Image Data"
  },
  "include_stop_str_in_output":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Include Stop Str In Output"
  },
  "input_ids":{
    "anyOf":[
      {
        "items":{
          "type":"integer"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "description":"Token IDs as input. Only used when messages is empty. Mutually exclusive with non-empty messages.",
    "title":"Input Ids"
  },
  "logit_bias":{
    "anyOf":[
      {
        "additionalProperties":{
          "type":"number"
        },
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Logit Bias"
  },
  "logprobs":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Logprobs"
  },
  "max_completion_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens",
    "examples":[
      null
    ],
    "title":"Max Completion Tokens"
  },
  "max_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "deprecated":true,
    "examples":[
      null
    ],
    "title":"Max Tokens"
  },
  "media_io_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional kwargs to pass to the media IO processing, keyed by modality.",
    "title":"Media Io Kwargs"
  },
  "messages":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "additionalProperties":true,
          "type":"object"
        },
        "type":"array"
      }
    ],
    "examples":[
      [
        {
          "content":"hi",
          "role":"user"
        }
      ]
    ],
    "title":"Messages"
  },
  "min_new_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Min New Tokens"
  },
  "min_p":{
    "default":0.0,
    "title":"Min P",
    "type":"number"
  },
  "mm_processor_kwargs":{
    "anyOf":[
      {
        "additionalProperties":true,
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "description":"Additional kwargs to pass to the HF processor",
    "title":"Mm Processor Kwargs"
  },
  "model":{
    "title":"Model",
    "type":"string"
  },
  "n":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":1,
    "title":"N"
  },
  "parallel_tool_calls":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Parallel Tool Calls"
  },
  "presence_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Presence Penalty"
  },
  "reasoning_effort":{
    "anyOf":[
      {
        "enum":[
          "low",
          "medium",
          "high"
        ],
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Reasoning Effort"
  },
  "repetition_ngram_size":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Size",
    "type":"integer"
  },
  "repetition_ngram_threshold":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Threshold",
    "type":"integer"
  },
  "repetition_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Repetition Penalty"
  },
  "response_format":{
    "anyOf":[
      {
        "properties":{
          "json_schema":{
            "anyOf":[
              {
                "properties":{
                  "description":{
                    "anyOf":[
                      {
                        "type":"string"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "title":"Description"
                  },
                  "name":{
                    "title":"Name",
                    "type":"string"
                  },
                  "schema":{
                    "anyOf":[
                      {
                        "additionalProperties":true,
                        "type":"object"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "examples":[
                      null
                    ],
                    "title":"Schema"
                  },
                  "strict":{
                    "anyOf":[
                      {
                        "type":"boolean"
                      },
                      {
                        "type":"null"
                      }
                    ],
                    "default":false,
                    "title":"Strict"
                  }
                },
                "required":[
                  "name"
                ],
                "title":"JsonSchema",
                "type":"object"
              },
              {
                "type":"null"
              }
            ]
          },
          "regex_schema":{
            "anyOf":[
              {
                "type":"string"
              },
              {
                "type":"null"
              }
            ],
            "title":"Regex Schema"
          },
          "type":{
            "enum":[
              "text",
              "json_object",
              "json_schema",
              "regex_schema"
            ],
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "type"
        ],
        "title":"ResponseFormat",
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ]
  },
  "return_logprob":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Return Logprob"
  },
  "return_routed_experts":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "description":"Whether to return MoE routed expert indices in the response.",
    "title":"Return Routed Experts"
  },
  "return_token_ids":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Return Token Ids"
  },
  "seed":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Seed"
  },
  "session_id":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":-1,
    "title":"Session Id"
  },
  "skip_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Skip Special Tokens"
  },
  "spaces_between_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Spaces Between Special Tokens"
  },
  "stop":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Stop"
  },
  "stream":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Stream"
  },
  "stream_options":{
    "anyOf":[
      {
        "description":"The stream options.",
        "properties":{
          "include_usage":{
            "anyOf":[
              {
                "type":"boolean"
              },
              {
                "type":"null"
              }
            ],
            "default":false,
            "title":"Include Usage"
          }
        },
        "title":"StreamOptions",
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ]
  },
  "temperature":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.7,
    "title":"Temperature"
  },
  "tool_choice":{
    "anyOf":[
      {
        "description":"The tool choice definition.",
        "properties":{
          "function":{
            "description":"The name of tool choice function.",
            "properties":{
              "name":{
                "title":"Name",
                "type":"string"
              }
            },
            "required":[
              "name"
            ],
            "title":"ToolChoiceFuncName",
            "type":"object"
          },
          "type":{
            "const":"function",
            "default":"function",
            "examples":[
              "function"
            ],
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "function"
        ],
        "title":"ToolChoice",
        "type":"object"
      },
      {
        "description":"Allowed tool choice definition.",
        "properties":{
          "allowed_tools":{
            "description":"Constrains the tools available to the model to a pre-defined set.",
            "properties":{
              "mode":{
                "enum":[
                  "auto",
                  "required"
                ],
                "title":"Mode",
                "type":"string"
              },
              "tools":{
                "items":{
                  "additionalProperties":true,
                  "type":"object"
                },
                "title":"Tools",
                "type":"array"
              }
            },
            "required":[
              "mode",
              "tools"
            ],
            "title":"AllowedTools",
            "type":"object"
          },
          "type":{
            "const":"allowed_tools",
            "default":"allowed_tools",
            "title":"Type",
            "type":"string"
          }
        },
        "required":[
          "allowed_tools"
        ],
        "title":"AllowedToolChoice",
        "type":"object"
      },
      {
        "enum":[
          "auto",
          "required",
          "none"
        ],
        "type":"string"
      }
    ],
    "default":"auto",
    "examples":[
      "none"
    ],
    "title":"Tool Choice"
  },
  "tools":{
    "anyOf":[
      {
        "items":{
          "description":"Function wrapper.",
          "properties":{
            "function":{
              "description":"Function descriptions.",
              "properties":{
                "description":{
                  "anyOf":[
                    {
                      "type":"string"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "examples":[
                    null
                  ],
                  "title":"Description"
                },
                "name":{
                  "title":"Name",
                  "type":"string"
                },
                "parameters":{
                  "anyOf":[
                    {
                      "additionalProperties":true,
                      "type":"object"
                    },
                    {
                      "type":"null"
                    }
                  ],
                  "title":"Parameters"
                }
              },
              "required":[
                "name"
              ],
              "title":"Function",
              "type":"object"
            },
            "type":{
              "default":"function",
              "examples":[
                "function"
              ],
              "title":"Type",
              "type":"string"
            }
          },
          "required":[
            "function"
          ],
          "title":"Tool",
          "type":"object"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Tools"
  },
  "top_k":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":40,
    "title":"Top K"
  },
  "top_logprobs":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Top Logprobs"
  },
  "top_p":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Top P"
  },
  "user":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"User"
  }
}

Example request:

POST /v1/chat/completions HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "chat_template_kwargs": {},
    "do_preprocess": true,
    "enable_thinking": true,
    "frequency_penalty": 1.0,
    "ignore_eos": true,
    "image_data": "string",
    "include_stop_str_in_output": true,
    "input_ids": [
        1
    ],
    "logit_bias": {},
    "logprobs": true,
    "max_completion_tokens": 1,
    "max_tokens": 1,
    "media_io_kwargs": {},
    "messages": "string",
    "min_new_tokens": 1,
    "min_p": 1.0,
    "mm_processor_kwargs": {},
    "model": "string",
    "n": 1,
    "parallel_tool_calls": true,
    "presence_penalty": 1.0,
    "reasoning_effort": "low",
    "repetition_ngram_size": 1,
    "repetition_ngram_threshold": 1,
    "repetition_penalty": 1.0,
    "response_format": {
        "json_schema": {
            "description": "string",
            "name": "string",
            "schema": {},
            "strict": true
        },
        "regex_schema": "string",
        "type": "text"
    },
    "return_logprob": true,
    "return_routed_experts": true,
    "return_token_ids": true,
    "seed": 1,
    "session_id": 1,
    "skip_special_tokens": true,
    "spaces_between_special_tokens": true,
    "stop": "string",
    "stream": true,
    "stream_options": {
        "include_usage": true
    },
    "temperature": 1.0,
    "tool_choice": {
        "function": {
            "name": "string"
        },
        "type": "string"
    },
    "tools": [
        {
            "function": {
                "description": "string",
                "name": "string",
                "parameters": {}
            },
            "type": "string"
        }
    ],
    "top_k": 1,
    "top_logprobs": 1,
    "top_p": 1.0,
    "user": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

POST /v1/completions#

Completions V1

Completion API similar to OpenAI’s API.

Go to https://platform.openai.com/docs/api-reference/completions/create for the API specification.

The request should be a JSON object with the following fields:

  • model (str): model name. Available from /v1/models.

  • prompt (str): the input prompt.

  • suffix (str): The suffix that comes after a completion of inserted text.

  • max_completion_tokens (int | None): output token nums. Default to None.

  • max_tokens (int): output token nums. Default to 16. Deprecated: Use max_completion_tokens instead.

  • temperature (float): to modulate the next token probability

  • top_p (float): If set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are kept for generation.

  • n (int): How many chat completion choices to generate for each input message. Only support one here.

  • stream: whether to stream the results or not. Default to false.

  • repetition_penalty (float): The parameter for repetition penalty. 1.0 means no penalty

  • user (str): A unique identifier representing your end-user.

  • stop (str | list[str] | None): To stop generating further tokens. Only accept stop words that’s encoded to one token idex.

Additional arguments supported by LMDeploy:

  • ignore_eos (bool): indicator for ignoring eos

  • skip_special_tokens (bool): Whether or not to remove special tokens in the decoding. Default to be True.

  • top_k (int): The number of the highest probability vocabulary tokens to keep for top-k-filtering

Currently we do not support the following features:

  • logprobs (not supported yet)

  • presence_penalty (replaced with repetition_penalty)

  • frequency_penalty (replaced with repetition_penalty)

Request body:

{
  "echo":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Echo"
  },
  "frequency_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Frequency Penalty"
  },
  "ignore_eos":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Ignore Eos"
  },
  "logprobs":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Logprobs"
  },
  "max_completion_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens",
    "examples":[
      null
    ],
    "title":"Max Completion Tokens"
  },
  "max_tokens":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":16,
    "deprecated":true,
    "examples":[
      16
    ],
    "title":"Max Tokens"
  },
  "min_p":{
    "default":0.0,
    "title":"Min P",
    "type":"number"
  },
  "model":{
    "title":"Model",
    "type":"string"
  },
  "n":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":1,
    "title":"N"
  },
  "presence_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.0,
    "title":"Presence Penalty"
  },
  "prompt":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{},
        "type":"array"
      }
    ],
    "title":"Prompt"
  },
  "repetition_ngram_size":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Size",
    "type":"integer"
  },
  "repetition_ngram_threshold":{
    "default":0,
    "minimum":0.0,
    "title":"Repetition Ngram Threshold",
    "type":"integer"
  },
  "repetition_penalty":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Repetition Penalty"
  },
  "seed":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "title":"Seed"
  },
  "session_id":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":-1,
    "title":"Session Id"
  },
  "skip_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Skip Special Tokens"
  },
  "spaces_between_special_tokens":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":true,
    "title":"Spaces Between Special Tokens"
  },
  "stop":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "items":{
          "type":"string"
        },
        "type":"array"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ],
    "title":"Stop"
  },
  "stream":{
    "anyOf":[
      {
        "type":"boolean"
      },
      {
        "type":"null"
      }
    ],
    "default":false,
    "title":"Stream"
  },
  "stream_options":{
    "anyOf":[
      {
        "description":"The stream options.",
        "properties":{
          "include_usage":{
            "anyOf":[
              {
                "type":"boolean"
              },
              {
                "type":"null"
              }
            ],
            "default":false,
            "title":"Include Usage"
          }
        },
        "title":"StreamOptions",
        "type":"object"
      },
      {
        "type":"null"
      }
    ],
    "examples":[
      null
    ]
  },
  "suffix":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"Suffix"
  },
  "temperature":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":0.7,
    "title":"Temperature"
  },
  "top_k":{
    "anyOf":[
      {
        "type":"integer"
      },
      {
        "type":"null"
      }
    ],
    "default":40,
    "title":"Top K"
  },
  "top_p":{
    "anyOf":[
      {
        "type":"number"
      },
      {
        "type":"null"
      }
    ],
    "default":1.0,
    "title":"Top P"
  },
  "user":{
    "anyOf":[
      {
        "type":"string"
      },
      {
        "type":"null"
      }
    ],
    "title":"User"
  }
}

Example request:

POST /v1/completions HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "echo": true,
    "frequency_penalty": 1.0,
    "ignore_eos": true,
    "logprobs": 1,
    "max_completion_tokens": 1,
    "max_tokens": 1,
    "min_p": 1.0,
    "model": "string",
    "n": 1,
    "presence_penalty": 1.0,
    "prompt": "string",
    "repetition_ngram_size": 1,
    "repetition_ngram_threshold": 1,
    "repetition_penalty": 1.0,
    "seed": 1,
    "session_id": 1,
    "skip_special_tokens": true,
    "spaces_between_special_tokens": true,
    "stop": "string",
    "stream": true,
    "stream_options": {
        "include_usage": true
    },
    "suffix": "string",
    "temperature": 1.0,
    "top_k": 1,
    "top_p": 1.0,
    "user": "string"
}
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • 422 Unprocessable Entity

    Validation Error

    Example response:

    HTTP/1.1 422 Unprocessable Entity
    Content-Type: application/json
    
    {
        "detail": [
            {
                "ctx": {},
                "input": {},
                "loc": [
                    "string",
                    1
                ],
                "msg": "string",
                "type": "string"
            }
        ]
    }
    

GET /v1/models#

Available Models

Show available models.

Example request:

GET /v1/models HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    Successful Response

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}