{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/venice-ai/main/json-schema/venice-ai-responses-request-schema.json",
  "title": "Responses API Request",
  "description": "Request body for the Responses API endpoint. E2EE-capable models are not supported on /api/v1/responses; use /api/v1/chat/completions with the required E2EE headers instead.",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/venice-ai-openapi.yml#/components/schemas/ResponsesRequest",
  "type": "object",
  "properties": {
    "model": {
      "type": "string",
      "description": "The ID of the model to use. E2EE-capable models are not supported on /api/v1/responses; use /api/v1/chat/completions with the required E2EE headers instead."
    },
    "input": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "message"
                    ]
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant",
                      "system",
                      "developer"
                    ]
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "input_text"
                                  ]
                                },
                                "text": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "text"
                              ],
                              "title": "Input Text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "input_image"
                                  ]
                                },
                                "image_url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string"
                                        },
                                        "detail": {
                                          "type": "string",
                                          "enum": [
                                            "auto",
                                            "low",
                                            "high",
                                            "original"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ]
                                    }
                                  ]
                                },
                                "detail": {
                                  "type": "string",
                                  "enum": [
                                    "auto",
                                    "low",
                                    "high",
                                    "original"
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "image_url"
                              ],
                              "title": "Input Image"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "output_text"
                                  ]
                                },
                                "text": {
                                  "type": "string"
                                },
                                "annotations": {
                                  "type": "array",
                                  "items": {
                                    "nullable": true
                                  }
                                }
                              },
                              "required": [
                                "type",
                                "text"
                              ],
                              "title": "Output Text (for history)"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "in_progress",
                      "incomplete"
                    ]
                  }
                },
                "required": [
                  "type",
                  "role",
                  "content"
                ],
                "title": "Input Message"
              },
              {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant",
                      "system",
                      "developer"
                    ]
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "input_text"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "title": "Input Text"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "input_image"
                                      ]
                                    },
                                    "image_url": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "url": {
                                              "type": "string"
                                            },
                                            "detail": {
                                              "type": "string",
                                              "enum": [
                                                "auto",
                                                "low",
                                                "high",
                                                "original"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "url"
                                          ]
                                        }
                                      ]
                                    },
                                    "detail": {
                                      "type": "string",
                                      "enum": [
                                        "auto",
                                        "low",
                                        "high",
                                        "original"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "image_url"
                                  ],
                                  "title": "Input Image"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "output_text"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    },
                                    "annotations": {
                                      "type": "array",
                                      "items": {
                                        "nullable": true
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "title": "Output Text (for history)"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ]
                                },
                                "text": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "text"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "image_url"
                                  ]
                                },
                                "image_url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string"
                                        },
                                        "detail": {
                                          "type": "string",
                                          "enum": [
                                            "auto",
                                            "low",
                                            "high",
                                            "original"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "image_url"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "in_progress",
                      "incomplete"
                    ]
                  }
                },
                "required": [
                  "role",
                  "content"
                ],
                "title": "Input Message (Flexible)"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "reasoning"
                    ]
                  },
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "summary": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "summary_text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        }
                      ]
                    }
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "nullable": true
                        }
                      },
                      {
                        "nullable": true,
                        "title": "null"
                      },
                      {
                        "nullable": true,
                        "title": "null"
                      }
                    ]
                  },
                  "encrypted_content": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "completed",
                      "in_progress"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "title": "Reasoning"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function_call"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "namespace": {
                    "type": "string"
                  },
                  "arguments": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "in_progress",
                      "incomplete"
                    ]
                  }
                },
                "required": [
                  "type",
                  "call_id",
                  "name",
                  "arguments"
                ],
                "title": "Function Call"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function_call_output"
                    ]
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "output": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "nullable": true
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": {
                          "nullable": true
                        }
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "nullable": true,
                        "title": "null"
                      },
                      {
                        "nullable": true,
                        "title": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "type",
                  "call_id",
                  "output"
                ],
                "title": "Function Call Output"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "item_reference"
                    ]
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id"
                ],
                "title": "Item Reference"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom_tool_call"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "namespace": {
                    "type": "string"
                  },
                  "input": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "in_progress",
                      "incomplete"
                    ]
                  }
                },
                "required": [
                  "type",
                  "call_id",
                  "name",
                  "input"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom_tool_call_output"
                    ]
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "output": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "nullable": true
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": {
                          "nullable": true
                        }
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "nullable": true,
                        "title": "null"
                      },
                      {
                        "nullable": true,
                        "title": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "type",
                  "call_id",
                  "output"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "additional_tools"
                    ]
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "developer"
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "defer_loading": {
                              "type": "boolean"
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "nullable": true
                                  }
                                },
                                "strict": {
                                  "type": "boolean"
                                },
                                "defer_loading": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "title": "Function Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "tool_search"
                              ]
                            },
                            "execution": {
                              "type": "string",
                              "enum": [
                                "client"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "parameters": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "object"
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "execution",
                            "parameters"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_search"
                              ]
                            },
                            "search_context_size": {
                              "type": "string",
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ]
                            },
                            "user_location": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "approximate"
                                  ]
                                },
                                "city": {
                                  "type": "string"
                                },
                                "region": {
                                  "type": "string"
                                },
                                "country": {
                                  "type": "string"
                                },
                                "timezone": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Web Search Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "x_search"
                              ]
                            },
                            "allowed_x_handles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "maxItems": 10
                            },
                            "excluded_x_handles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "maxItems": 10
                            },
                            "from_date": {
                              "type": "string"
                            },
                            "to_date": {
                              "type": "string"
                            },
                            "enable_image_understanding": {
                              "type": "boolean"
                            },
                            "enable_video_understanding": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "X Search Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "code_interpreter"
                              ]
                            },
                            "container": {
                              "type": "object",
                              "properties": {
                                "image": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Code Interpreter Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "file_search"
                              ]
                            },
                            "vector_store_ids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "max_num_results": {
                              "type": "integer"
                            },
                            "ranking_options": {
                              "type": "object",
                              "properties": {
                                "ranker": {
                                  "type": "string"
                                },
                                "score_threshold": {
                                  "type": "number"
                                }
                              }
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "File Search Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "computer_use_preview"
                              ]
                            },
                            "display_width": {
                              "type": "integer"
                            },
                            "display_height": {
                              "type": "integer"
                            },
                            "environment": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Computer Use Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Generic Tool"
                        }
                      ],
                      "title": "Tool Definition"
                    }
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "tools"
                ],
                "title": "Additional Tools"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "tool_search_call"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "execution": {
                    "type": "string",
                    "enum": [
                      "client"
                    ]
                  },
                  "arguments": {
                    "type": "object",
                    "additionalProperties": {
                      "nullable": true
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "in_progress",
                      "incomplete"
                    ]
                  }
                },
                "required": [
                  "type",
                  "call_id",
                  "execution",
                  "arguments"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "tool_search_output"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "execution": {
                    "type": "string",
                    "enum": [
                      "client"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed"
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "defer_loading": {
                              "type": "boolean"
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "nullable": true
                                  }
                                },
                                "strict": {
                                  "type": "boolean"
                                },
                                "defer_loading": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "title": "Function Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "tool_search"
                              ]
                            },
                            "execution": {
                              "type": "string",
                              "enum": [
                                "client"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "parameters": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "object"
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "execution",
                            "parameters"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_search"
                              ]
                            },
                            "search_context_size": {
                              "type": "string",
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ]
                            },
                            "user_location": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "approximate"
                                  ]
                                },
                                "city": {
                                  "type": "string"
                                },
                                "region": {
                                  "type": "string"
                                },
                                "country": {
                                  "type": "string"
                                },
                                "timezone": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Web Search Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "x_search"
                              ]
                            },
                            "allowed_x_handles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "maxItems": 10
                            },
                            "excluded_x_handles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "maxItems": 10
                            },
                            "from_date": {
                              "type": "string"
                            },
                            "to_date": {
                              "type": "string"
                            },
                            "enable_image_understanding": {
                              "type": "boolean"
                            },
                            "enable_video_understanding": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "X Search Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "code_interpreter"
                              ]
                            },
                            "container": {
                              "type": "object",
                              "properties": {
                                "image": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Code Interpreter Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "file_search"
                              ]
                            },
                            "vector_store_ids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "max_num_results": {
                              "type": "integer"
                            },
                            "ranking_options": {
                              "type": "object",
                              "properties": {
                                "ranker": {
                                  "type": "string"
                                },
                                "score_threshold": {
                                  "type": "number"
                                }
                              }
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "File Search Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "computer_use_preview"
                              ]
                            },
                            "display_width": {
                              "type": "integer"
                            },
                            "display_height": {
                              "type": "integer"
                            },
                            "environment": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Computer Use Tool"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "title": "Generic Tool"
                        }
                      ],
                      "title": "Tool Definition"
                    }
                  }
                },
                "required": [
                  "type",
                  "call_id",
                  "execution",
                  "tools"
                ]
              }
            ]
          }
        }
      ],
      "description": "The input to generate a response for. Can be a simple string or an array of messages."
    },
    "instructions": {
      "type": [
        "string",
        "null"
      ],
      "description": "System instructions for the model, applied before `input`."
    },
    "include": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Additional response fields to include (OpenAI-compatible)."
    },
    "max_output_tokens": {
      "type": "integer",
      "minimum": 0,
      "exclusiveMinimum": true,
      "description": "Maximum number of tokens to generate."
    },
    "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2,
      "description": "Sampling temperature between 0 and 2."
    },
    "top_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Nucleus sampling parameter."
    },
    "fallbacks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          }
        },
        "required": [
          "model"
        ]
      },
      "maxItems": 10,
      "description": "Anthropic beta parameter for Claude Fable 5 server-side refusal fallback. Forwarded only for direct Anthropic routes; ignored for other providers."
    },
    "reasoning": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "effort": {
          "type": "string",
          "enum": [
            "none",
            "minimal",
            "low",
            "medium",
            "high",
            "xhigh",
            "max"
          ],
          "description": "Controls reasoning effort level for supported models."
        },
        "enabled": {
          "type": "boolean",
          "description": "Set to false to disable reasoning on supported models. Ignored when an effort level is provided."
        },
        "summary": {
          "type": "string",
          "enum": [
            "auto",
            "concise",
            "detailed"
          ],
          "description": "Controls reasoning summary format."
        }
      },
      "description": "Reasoning controls for models that support reasoning.",
      "title": "Reasoning Configuration"
    },
    "parallel_tool_calls": {
      "type": "boolean",
      "description": "Whether the model may call more than one tool in a single turn."
    },
    "tools": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "function"
                ]
              },
              "defer_loading": {
                "type": "boolean"
              },
              "function": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "parameters": {
                    "type": "object",
                    "additionalProperties": {
                      "nullable": true
                    }
                  },
                  "strict": {
                    "type": "boolean"
                  },
                  "defer_loading": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "required": [
              "type",
              "function"
            ],
            "title": "Function Tool"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "tool_search"
                ]
              },
              "execution": {
                "type": "string",
                "enum": [
                  "client"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "parameters": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "object"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "type",
              "execution",
              "parameters"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "web_search"
                ]
              },
              "search_context_size": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              "user_location": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "approximate"
                    ]
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "timezone": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "type"
            ],
            "title": "Web Search Tool"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "x_search"
                ]
              },
              "allowed_x_handles": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 10
              },
              "excluded_x_handles": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 10
              },
              "from_date": {
                "type": "string"
              },
              "to_date": {
                "type": "string"
              },
              "enable_image_understanding": {
                "type": "boolean"
              },
              "enable_video_understanding": {
                "type": "boolean"
              }
            },
            "required": [
              "type"
            ],
            "title": "X Search Tool"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "code_interpreter"
                ]
              },
              "container": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "type"
            ],
            "title": "Code Interpreter Tool"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "file_search"
                ]
              },
              "vector_store_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "max_num_results": {
                "type": "integer"
              },
              "ranking_options": {
                "type": "object",
                "properties": {
                  "ranker": {
                    "type": "string"
                  },
                  "score_threshold": {
                    "type": "number"
                  }
                }
              }
            },
            "required": [
              "type"
            ],
            "title": "File Search Tool"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "computer_use_preview"
                ]
              },
              "display_width": {
                "type": "integer"
              },
              "display_height": {
                "type": "integer"
              },
              "environment": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "title": "Computer Use Tool"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "title": "Generic Tool"
          }
        ],
        "title": "Tool Definition"
      },
      "description": "A list of tools the model may call."
    },
    "tool_choice": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "auto"
          ]
        },
        {
          "type": "string",
          "enum": [
            "none"
          ]
        },
        {
          "type": "string",
          "enum": [
            "required"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "function",
                "custom"
              ]
            },
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "name"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "function"
              ]
            },
            "function": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "required": [
            "type",
            "function"
          ]
        }
      ],
      "description": "Controls which tool is called by the model."
    },
    "prompt_cache_retention": {
      "type": "string",
      "enum": [
        "in_memory",
        "24h",
        "default",
        "extended"
      ],
      "description": "Prompt cache retention for supported OpenAI models. \"24h\" or \"extended\" keeps cached prefixes for up to 24 hours."
    },
    "web_search": {
      "type": "boolean",
      "description": "Enable web search for this request."
    },
    "stream": {
      "type": "boolean",
      "description": "Whether to stream back partial progress."
    },
    "anon_user_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[\\x20-\\x7E]+$",
      "description": "Optional identifier for the API customer's end user. Combined with the Venice user id when attributing the request to upstream providers. Distinct from the discarded OpenAI `user` field. Must be printable ASCII and must not contain `||`."
    },
    "venice_parameters": {
      "type": "object",
      "properties": {
        "character_slug": {
          "type": "string",
          "description": "The character slug of a public Venice character."
        },
        "enable_e2ee": {
          "type": "boolean",
          "description": "Enable end-to-end encryption for E2EE-capable models. When true (default), E2EE is used if headers are present. When false, TEE-only mode is used."
        },
        "enable_web_search": {
          "type": "string",
          "enum": [
            "auto",
            false,
            true
          ],
          "description": "Enable web search for this request."
        },
        "enable_web_scraping": {
          "type": "boolean",
          "description": "Enable Venice web scraping of URLs in the latest user message."
        },
        "enable_web_citations": {
          "type": "boolean",
          "description": "Request that the LLM cite its sources."
        },
        "include_venice_system_prompt": {
          "type": "boolean",
          "description": "Whether to include the Venice supplied system prompts."
        },
        "include_search_results_in_stream": {
          "type": "boolean",
          "description": "Include search results in the stream as the first emitted chunk."
        }
      },
      "description": "Venice-specific options, such as web search, characters, and the Venice system prompt.",
      "title": "Venice Parameters"
    }
  },
  "required": [
    "model",
    "input"
  ]
}