{"openapi":"3.0.0","info":{"title":"Archestra — Apps","version":"v1.5.0-rc.22"},"components":{"schemas":{"LogContentNotStoredInput":{"type":"object","properties":{"__redacted":{"type":"string","enum":["log_content_policy"]},"isError":{"type":"boolean"},"errorType":{"type":"string","enum":["auth_required","auth_expired","assigned_credential_unavailable","tool_state","cancelled","generic"]},"archestraExecutedAs":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["personal"]},"ownerUserId":{"nullable":true,"type":"string"},"ownerName":{"nullable":true,"type":"string"}},"required":["kind","ownerUserId","ownerName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team"]},"teamId":{"type":"string"},"teamName":{"nullable":true,"type":"string"}},"required":["kind","teamId","teamName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["org"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["idp_exchange"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["idp_passthrough"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["caller_headers"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["platform"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false}]}},"required":["__redacted"]},"TextSearchLanguageInput":{"type":"string","enum":["simple","arabic","armenian","basque","catalan","danish","dutch","english","finnish","french","german","greek","hindi","hungarian","indonesian","irish","italian","lithuanian","nepali","norwegian","portuguese","romanian","russian","serbian","spanish","swedish","tamil","turkish","yiddish"]},"ContextualRetrievalModeInput":{"type":"string","enum":["disabled","document","chunk"]},"EmbeddingDimensionsInput":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"enum":[3072,1536,1408,1024,768,384]},"LocalConfigEnvironmentDefaultInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"OpenAiChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"}},"required":["model","messages"]},"OpenAiChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"]},"GeminiGenerateContentRequestInput":{"type":"object","properties":{"contents":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","description":"The role of the author of this content."},"parts":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"text":{"type":"string"},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["text"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"inlineData":{"type":"object","properties":{"mimeType":{"type":"string"},"data":{"type":"string"}},"required":["data"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["inlineData"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionCall":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["name"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionCall"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"response":{"type":"object","additionalProperties":{}},"willContinue":{"type":"boolean"},"scheduling":{"type":"string","enum":["SCHEDULING_UNSPECIFIED","SILENT","WHEN_IDLE","INTERRUPT"]}},"required":["name","response"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionResponse"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"fileData":{"type":"object","properties":{"mimeType":{"type":"string"},"fileUri":{"type":"string"}},"required":["fileUri"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["fileData"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"language":{"type":"string","enum":["LANGUAGE_UNSPECIFIED","PYTHON"]},"executableCode":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["language","executableCode"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"codeExecutionResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["OUTCOME_UNSPECIFIED","OUTCOME_OK","OUTCOME_FAILED","OUTCOME_DEADLINE_EXCEEDED"],"description":"Outcome of the code execution."},"output":{"type":"string"}},"required":["outcome"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["codeExecutionResult"]}]}],"description":"https://ai.google.dev/api/caching#Part"}}},"required":["role","parts"],"description":"\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"},"description":"The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request"},"tools":{"description":"A list of Tools the Model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the Model. Supported Tools are Function and codeExecution. Refer to the Function calling and the Code execution guides to learn more.","anyOf":[{"type":"array","items":{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}},{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}]},"toolConfig":{"description":"Tool configuration for any Tool specified in the request.","type":"object","properties":{"functionCallingConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["AUTO","ANY","NONE"]},"allowedFunctionNames":{"type":"array","items":{"type":"string"}}},"required":["mode"]}},"required":["functionCallingConfig"]},"safetySettings":{"description":"A list of unique SafetySetting instances for blocking unsafe content.","type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_DEROGATORY","HARM_CATEGORY_TOXICITY","HARM_CATEGORY_VIOLENCE","HARM_CATEGORY_SEXUAL","HARM_CATEGORY_MEDICAL","HARM_CATEGORY_DANGEROUS","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY"],"description":"\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"},"threshold":{"type":"string","enum":["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"],"description":"\n      Controls the probability threshold at which harm is blocked.\n\n      https://ai.google.dev/api/generate-content#HarmBlockThreshold\n      "}},"required":["category","threshold"],"description":"https://ai.google.dev/api/generate-content#v1beta.SafetySetting"}},"systemInstruction":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}},"required":["parts"],"description":"Developer set system instruction(s). Currently, text only."},"generationConfig":{"type":"object","properties":{"stopSequences":{"type":"array","items":{"type":"string"}},"responseMimeType":{"type":"string"},"responseSchema":{},"_responseJsonSchema":{},"responseJsonSchema":{},"responseModalities":{"type":"array","items":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"}},"candidateCount":{"type":"number"},"maxOutputTokens":{"type":"number"},"temperature":{"type":"number"},"topP":{"type":"number"},"topK":{"type":"number"},"seed":{"type":"number"},"presencePenalty":{"type":"number"},"frequencyPenalty":{"type":"number"},"responseLogprobs":{"type":"boolean"},"logProbs":{"type":"number"},"enableEnhancedCivicAnswers":{"type":"boolean"},"speechConfig":{},"thinkingConfig":{},"imageConfig":{},"mediaResolution":{"description":"https://ai.google.dev/api/generate-content#MediaResolution","type":"string","enum":["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]}},"description":"https://ai.google.dev/api/generate-content#v1beta.GenerationConfig"},"cachedContent":{"description":"The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}","type":"string"},"config":{"type":"object","properties":{"tools":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}},{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}]},"toolConfig":{"description":"Tool configuration for any Tool specified in the request.","type":"object","properties":{"functionCallingConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["AUTO","ANY","NONE"]},"allowedFunctionNames":{"type":"array","items":{"type":"string"}}},"required":["mode"]}},"required":["functionCallingConfig"]}}}},"required":["contents"]},"GeminiGenerateContentResponseInput":{"type":"object","properties":{"candidates":{"description":"Candidate responses from the model","type":"array","items":{"type":"object","properties":{"content":{"type":"object","properties":{"role":{"type":"string","description":"The role of the author of this content."},"parts":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"text":{"type":"string"},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["text"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"inlineData":{"type":"object","properties":{"mimeType":{"type":"string"},"data":{"type":"string"}},"required":["data"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["inlineData"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionCall":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["name"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionCall"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"response":{"type":"object","additionalProperties":{}},"willContinue":{"type":"boolean"},"scheduling":{"type":"string","enum":["SCHEDULING_UNSPECIFIED","SILENT","WHEN_IDLE","INTERRUPT"]}},"required":["name","response"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionResponse"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"fileData":{"type":"object","properties":{"mimeType":{"type":"string"},"fileUri":{"type":"string"}},"required":["fileUri"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["fileData"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"language":{"type":"string","enum":["LANGUAGE_UNSPECIFIED","PYTHON"]},"executableCode":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["language","executableCode"]},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"codeExecutionResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["OUTCOME_UNSPECIFIED","OUTCOME_OK","OUTCOME_FAILED","OUTCOME_DEADLINE_EXCEEDED"],"description":"Outcome of the code execution."},"output":{"type":"string"}},"required":["outcome"]},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["codeExecutionResult"]}]}],"description":"https://ai.google.dev/api/caching#Part"}}},"required":["role","parts"],"description":"\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"},"finishReason":{"description":"\n  The reason why the model stopped generating tokens.\n\n  If empty, the model has not stopped generating tokens.\n\n  https://ai.google.dev/api/generate-content#FinishReason\n","anyOf":[{"type":"string","enum":["FINISH_REASON_UNSPECIFIED","STOP","MAX_TOKENS","SAFETY","RECITATION","LANGUAGE","OTHER","BLOCKLIST","PROHIBITED_CONTENT","SPII","MALFORMED_FUNCTION_CALL","IMAGE_SAFETY","IMAGE_PROHIBITED_CONTENT","IMAGE_OTHER","NO_IMAGE","IMAGE_RECITATION","UNEXPECTED_TOOL_CALL","TOO_MANY_TOOL_CALLS"]},{"type":"string"}]},"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_DEROGATORY","HARM_CATEGORY_TOXICITY","HARM_CATEGORY_VIOLENCE","HARM_CATEGORY_SEXUAL","HARM_CATEGORY_MEDICAL","HARM_CATEGORY_DANGEROUS","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY"],"description":"\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"},"probability":{"type":"string","enum":["HARM_PROBABILITY_UNSPECIFIED","NEGLIGIBLE","LOW","MEDIUM","HIGH"],"description":"https://ai.google.dev/api/generate-content#HarmProbability"},"blocked":{"description":"Was this content blocked because of this rating?","type":"boolean"}},"required":["category","probability"],"description":"https://ai.google.dev/api/generate-content#v1beta.SafetyRating"}},"citationMetadata":{"description":"https://ai.google.dev/api/generate-content#citationmetadata","type":"object","properties":{"citationSources":{"type":"array","items":{"description":"https://ai.google.dev/api/generate-content#CitationSource","type":"object","properties":{"startIndex":{"type":"number"},"endIndex":{"type":"number"},"uri":{"type":"string"},"license":{"type":"string"}}}}},"required":["citationSources"]},"tokenCount":{"type":"number"},"groundingAttributions":{"type":"array","items":{}},"groundingMetadata":{},"avgLogprobs":{"type":"number"},"logprobsResult":{},"urlContextMetadata":{},"index":{"description":"Index of the candidate in the list of response candidates.","type":"number"},"finishMessage":{"description":"Details the reason why the model stopped generating tokens. This is populated only when finishReason is set.","type":"string"}},"description":"https://ai.google.dev/api/generate-content#candidate"}},"promptFeedback":{"description":"Returns the prompt's feedback related to the content filters","type":"object","properties":{"blockReason":{"description":"Specifies the reason why the prompt was blocked. https://ai.google.dev/api/generate-content#BlockReason","anyOf":[{"type":"string","enum":["BLOCK_REASON_UNSPECIFIED","SAFETY","OTHER","BLOCKLIST","PROHIBITED_CONTENT","IMAGE_SAFETY"]},{"type":"string"}]},"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_DEROGATORY","HARM_CATEGORY_TOXICITY","HARM_CATEGORY_VIOLENCE","HARM_CATEGORY_SEXUAL","HARM_CATEGORY_MEDICAL","HARM_CATEGORY_DANGEROUS","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY"],"description":"\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"},"probability":{"type":"string","enum":["HARM_PROBABILITY_UNSPECIFIED","NEGLIGIBLE","LOW","MEDIUM","HIGH"],"description":"https://ai.google.dev/api/generate-content#HarmProbability"},"blocked":{"description":"Was this content blocked because of this rating?","type":"boolean"}},"required":["category","probability"],"description":"https://ai.google.dev/api/generate-content#v1beta.SafetyRating"}}}},"usageMetadata":{"description":"Metadata on the generation requests' token usage","type":"object","properties":{"trafficType":{"description":"Traffic tier that served the request.","type":"string"},"promptTokenCount":{"type":"number"},"cachedContentTokenCount":{"type":"number"},"candidatesTokenCount":{"type":"number"},"toolUsePromptTokenCount":{"type":"number"},"thoughtsTokenCount":{"type":"number"},"totalTokenCount":{"type":"number"},"promptTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}},"cacheTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}},"candidatesTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}},"toolUsePromptTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}}}},"modelVersion":{"description":"The model version used to generate the response.","type":"string"},"responseId":{"description":"The unique response ID.","type":"string"}}},"AnthropicMessagesRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]},"cache_control":{"nullable":true}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["application/pdf"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"media_type":{"type":"string","enum":["text/plain"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["content"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]},"cache_control":{"nullable":true}},"required":["type","source"]}]}}]}},"required":["type","content"]}]},"title":{"nullable":true,"type":"string"},"context":{"nullable":true,"type":"string"},"citations":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"cache_control":{"nullable":true}},"required":["type","source"],"description":"Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"]},"data":{"type":"string"}},"required":["type","data"]},{"type":"object","properties":{"id":{"type":"string"},"input":{},"name":{"type":"string"},"type":{"type":"string","enum":["tool_use"]},"cache_control":{"nullable":true}},"required":["id","input","name","type"]},{"type":"object","properties":{"tool_use_id":{"type":"string"},"type":{"type":"string","enum":["tool_result"]},"cache_control":{"nullable":true},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]},"cache_control":{"nullable":true}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["application/pdf"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"media_type":{"type":"string","enum":["text/plain"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["content"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]},"cache_control":{"nullable":true}},"required":["type","source"]}]}}]}},"required":["type","content"]}]},"title":{"nullable":true,"type":"string"},"context":{"nullable":true,"type":"string"},"citations":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"cache_control":{"nullable":true}},"required":["type","source"],"description":"Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"}]}}]},"is_error":{"type":"boolean"}},"required":["tool_use_id","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["search_result","server_tool_use","web_search_tool_result","web_fetch_tool_result","code_execution_tool_result","bash_code_execution_tool_result","text_editor_code_execution_tool_result","tool_search_tool_result","container_upload"]}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}}]},"role":{"type":"string","enum":["user","assistant","system"]}},"required":["content","role"]}},"max_tokens":{"type":"number"},"container":{"nullable":true,"type":"string"},"context_management":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}},"mcp_servers":{"type":"array","items":{}},"metadata":{"type":"object","properties":{"user_id":{"nullable":true,"type":"string"}},"additionalProperties":{}},"output_config":{"type":"object","properties":{"effort":{"nullable":true,"type":"string"},"format":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"schema":{"type":"object","additionalProperties":{}}},"required":["type","schema"]}},"additionalProperties":{}},"service_tier":{},"speed":{"type":"string","enum":["fast","standard"]},"stop_sequences":{"type":"array","items":{"type":"string"}},"stream":{"type":"boolean"},"system":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["type","text"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["type","text"],"additionalProperties":{}}}]},"temperature":{"type":"number"},"thinking":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["enabled"]},"budget_tokens":{"type":"number"},"display":{"nullable":true,"type":"string","enum":["summarized","omitted","updates"]},"block_binding":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["type","budget_tokens"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["disabled"]}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["between_tools"]}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["adaptive"]},"display":{"nullable":true,"type":"string","enum":["summarized","omitted","updates"]},"block_binding":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]},"tool_choice":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string"},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]}]},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"type":{"nullable":true,"type":"string","enum":["custom"]},"cache_control":{"nullable":true},"input_schema":{"type":"object","additionalProperties":{}},"description":{"type":"string"}},"required":["name","input_schema"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["bash"]},"type":{"type":"string","enum":["bash_20250124"]},"cache_control":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["str_replace_editor"]},"type":{"type":"string","enum":["text_editor_20250124"]},"cache_control":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["str_replace_based_edit_tool"]},"type":{"type":"string","enum":["text_editor_20250429"]},"cache_control":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["str_replace_based_edit_tool"]},"type":{"type":"string","enum":["text_editor_20250728"]},"cache_control":{"nullable":true},"max_characters":{"nullable":true,"type":"number"}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["web_search"]},"type":{"type":"string","enum":["web_search_20250305"]},"allowed_domains":{"nullable":true,"type":"array","items":{"type":"string"}},"blocked_domains":{"nullable":true,"type":"array","items":{"type":"string"}},"cache_control":{"nullable":true},"max_uses":{"nullable":true,"type":"number"},"user_location":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}},"top_k":{"type":"number"},"top_p":{"type":"number"}},"required":["model","messages","max_tokens"],"additionalProperties":{}},"AnthropicMessagesResponseInput":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"citations":{"nullable":true,"type":"array","items":{}},"text":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["citations","text","type"],"additionalProperties":{}},{"type":"object","properties":{"id":{"type":"string"},"input":{},"name":{"type":"string"},"type":{"type":"string","enum":["tool_use"]}},"required":["id","input","name","type"],"additionalProperties":{}}]}},"model":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"stop_reason":{"nullable":true},"stop_sequence":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["message"]},"usage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_read_input_tokens":{"nullable":true,"type":"number"},"cache_creation_input_tokens":{"nullable":true,"type":"number"},"cache_creation":{"nullable":true,"type":"object","properties":{"ephemeral_1h_input_tokens":{"nullable":true,"type":"number"},"ephemeral_5m_input_tokens":{"nullable":true,"type":"number"}}}},"required":["input_tokens","output_tokens"],"additionalProperties":{}}},"required":["id","content","model","role","type","usage"],"additionalProperties":{}},"CerebrasChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"}},"required":["model","messages"]},"CerebrasChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"}},"required":["finish_reason","message"],"description":"https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"]},"CohereChatRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"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":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"]}},"required":["type","image_url"]}]}}]}},"required":["role","content"]},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"content":{"type":"string"}},"required":["type","tool_call_id","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"}},"required":["type","thinking"]},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}}]},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}}},"required":["role"]},{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"}},"required":["role","content"]},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"tool_call_id":{"type":"string"},"content":{"type":"string"}},"required":["role","tool_call_id","content"]}]}},"stream":{"type":"boolean"},"temperature":{"type":"number"},"max_tokens":{"type":"number"},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"required":{"type":"array","items":{"type":"string"}},"properties":{"type":"object","additionalProperties":{}}},"required":["type"]}},"required":["name"]}},"required":["type","function"]}},"tool_choice":{"type":"string","enum":["REQUIRED","NONE"]},"safety_mode":{"type":"string","enum":["CONTEXTUAL","STRICT","OFF"]},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["json_object","text"]},"json_schema":{"type":"object","additionalProperties":{}}},"required":["type"]},"frequency_penalty":{"type":"number"},"presence_penalty":{"type":"number"},"k":{"type":"number"},"p":{"type":"number"},"seed":{"type":"number"},"stop_sequences":{"type":"array","items":{"type":"string"}},"logprobs":{"type":"boolean"}},"required":["model","messages"]},"CohereChatResponseInput":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"content":{"type":"string"}},"required":["type","tool_call_id","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"}},"required":["type","thinking"]},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}}},"required":["role"]},"finish_reason":{"anyOf":[{"type":"string","enum":["COMPLETE","MAX_TOKENS","STOP_SEQUENCE","TOOL_CALL","ERROR"]},{"type":"string"}]},"usage":{"type":"object","properties":{"billed_units":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"}}},"tokens":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"}}}}}},"required":["id","message","finish_reason"]},"MistralChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"}},"required":["model","messages"]},"MistralChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"PerplexityChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"},"stream_mode":{"type":"string","enum":["full","concise"]}},"required":["model","messages"]},"PerplexityChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"GroqChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"}},"required":["model","messages"]},"GroqChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"OpenrouterChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"]}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"]},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"]}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"]},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"]},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}]}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"]},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"]}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"]},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"]},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"]},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object","json_schema"]}},"required":["type"],"additionalProperties":{}},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"},"effort":{"type":"string"},"max_tokens":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"exclude":{"type":"boolean"}}}},"required":["model","messages"]},"OpenrouterChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"JevDecisionsRequestInput":{"type":"object","properties":{"model":{"type":"string"},"state":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"The content the questions are about"},"questions":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"Question kind: noul, choice, or score"},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"criteria":{}},"required":["type","instructions","criteria"],"additionalProperties":{}},"description":"Decision questions keyed by name"}},"required":["model","state","questions"],"additionalProperties":{}},"JevDecisionsResponseInput":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"answers":{"type":"object","additionalProperties":{}},"usage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cost":{"type":"number"}},"additionalProperties":{}}},"required":["answers"],"additionalProperties":{}},"VllmChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"A developer message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"A system message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image URL details"}},"required":["type","image_url"],"description":"An image content part"},{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"Audio input details"}},"required":["type","input_audio"],"description":"An audio content part"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"File details"}},"required":["type","file"],"description":"A file content part"}],"description":"A content part in a message"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"A user message"},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"A refusal content part"}}]},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"Function call details"}},"required":["id","type","function"],"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"Custom tool call details"}},"required":["id","type","custom"],"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}},"reasoning":{"nullable":true,"type":"string"},"reasoning_content":{"nullable":true,"type":"string"}},"required":["role"],"description":"An assistant message"},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image URL details"}},"required":["type","image_url"],"description":"An image content part"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"A tool result message"},{"type":"object","properties":{"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"A function result message (deprecated)"}],"description":"A message in the conversation"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"A function definition for tool calling"}},"required":["type","function"],"description":"A function tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"]}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"A custom tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"A custom tool in the flat Responses-API shape (see the OpenAI provider's ResponsesStyleCustomToolSchema)"}],"description":"A tool definition"}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"A function definition for tool calling"}},"required":["type","function"],"description":"A function tool definition"}}}},"required":["mode","tools"],"description":"Allowed tools configuration"}},"required":["type","allowed_tools"],"description":"Allowed tool choice configuration"},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"Named function tool choice"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"]}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"A custom tool definition"}],"description":"Tool choice option"},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"stream":{"nullable":true,"type":"boolean"},"top_p":{"nullable":true,"type":"number"},"top_k":{"nullable":true,"type":"number"},"frequency_penalty":{"nullable":true,"type":"number"},"presence_penalty":{"nullable":true,"type":"number"},"repetition_penalty":{"nullable":true,"type":"number"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"seed":{"nullable":true,"type":"number"},"n":{"nullable":true,"type":"number"},"best_of":{"nullable":true,"type":"number"},"logprobs":{"nullable":true,"type":"boolean"},"top_logprobs":{"nullable":true,"type":"number"},"chat_template_kwargs":{"type":"object","additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string"}},"required":["model","messages"]},"VllmChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"Function call details"}},"required":["id","type","function"],"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"Custom tool call details"}},"required":["id","type","custom"],"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}},"reasoning":{"nullable":true,"type":"string"},"reasoning_content":{"nullable":true,"type":"string"}},"required":["role"],"description":"The assistant message in the response"}},"required":["finish_reason","message"],"description":"A choice in the chat completion response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{},"prompt_tokens_details":{}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"Token usage statistics for the completion"}},"required":["id","choices","created","model","object"]},"OllamaChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"A developer message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"A system message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image URL details"}},"required":["type","image_url"],"description":"An image content part"},{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"Audio input details"}},"required":["type","input_audio"],"description":"An audio content part"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"File details"}},"required":["type","file"],"description":"A file content part"}],"description":"A content part in a message"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"A user message"},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"A refusal content part"}}]},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"Function call details"}},"required":["id","type","function"],"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"Custom tool call details"}},"required":["id","type","custom"],"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}}},"required":["role"],"description":"An assistant message"},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image URL details"}},"required":["type","image_url"],"description":"An image content part"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"A tool result message"},{"type":"object","properties":{"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"A function result message (deprecated)"}],"description":"A message in the conversation"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"A function definition for tool calling"}},"required":["type","function"],"description":"A function tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"]}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"A custom tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"A custom tool in the flat Responses-API shape (see the OpenAI provider's ResponsesStyleCustomToolSchema)"}],"description":"A tool definition"}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"A function definition for tool calling"}},"required":["type","function"],"description":"A function tool definition"}}}},"required":["mode","tools"],"description":"Allowed tools configuration"}},"required":["type","allowed_tools"],"description":"Allowed tool choice configuration"},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"Named function tool choice"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"]}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"A custom tool definition"}],"description":"Tool choice option"},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"stream":{"nullable":true,"type":"boolean"},"top_p":{"nullable":true,"type":"number"},"frequency_penalty":{"nullable":true,"type":"number"},"presence_penalty":{"nullable":true,"type":"number"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"seed":{"nullable":true,"type":"number"},"n":{"nullable":true,"type":"number"},"reasoning_effort":{"nullable":true,"type":"string"}},"required":["model","messages"]},"OllamaChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"Function call details"}},"required":["id","type","function"],"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"Custom tool call details"}},"required":["id","type","custom"],"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}}},"required":["role"],"description":"The assistant message in the response"}},"required":["finish_reason","message"],"description":"A choice in the chat completion response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{},"prompt_tokens_details":{}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"Token usage statistics for the completion"}},"required":["id","choices","created","model","object"]},"OllamaNativeChatRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}}]},"thinking":{"type":"string"},"images":{"type":"array","items":{"type":"string"}},"tool_calls":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"function":{"type":"object","properties":{"index":{"type":"number"},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]}},"required":["name","arguments"],"additionalProperties":{}}},"required":["function"],"additionalProperties":{}}},"tool_name":{"type":"string"},"tool_call_id":{"type":"string"}},"required":["role"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":{}}},"required":["type","function"],"additionalProperties":{}}},"format":{},"options":{"type":"object","properties":{"temperature":{"type":"number"},"top_k":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"top_p":{"type":"number"},"min_p":{"type":"number"},"typical_p":{"type":"number"},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repeat_penalty":{"type":"number"},"repeat_last_n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"},"stop":{"maxItems":16,"type":"array","items":{"type":"string","maxLength":256}},"num_keep":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"num_ctx":{"type":"integer","minimum":1,"maximum":10000000},"num_predict":{"type":"integer","minimum":-2,"maximum":9007199254740991}}},"stream":{"nullable":true,"type":"boolean"},"keep_alive":{"anyOf":[{"type":"string"},{"type":"number"}]},"think":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"temperature":{"nullable":true,"type":"number"},"top_p":{"nullable":true,"type":"number"},"max_output_tokens":{"nullable":true,"type":"number"},"truncate":{"type":"boolean"},"shift":{"type":"boolean"}},"required":["model","messages"],"additionalProperties":{}},"OllamaNativeChatResponseInput":{"type":"object","properties":{"model":{"type":"string"},"created_at":{"type":"string"},"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"},"thinking":{"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"function":{"type":"object","properties":{"index":{"type":"number"},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]}},"required":["name","arguments"],"additionalProperties":{}}},"required":["function"],"additionalProperties":{}}}},"required":["role"],"additionalProperties":{}},"done":{"type":"boolean"},"done_reason":{"type":"string"},"total_duration":{"type":"number"},"load_duration":{"type":"number"},"prompt_eval_count":{"type":"number"},"prompt_eval_duration":{"type":"number"},"eval_count":{"type":"number"},"eval_duration":{"type":"number"}},"required":["model","message","done"],"additionalProperties":{}},"ZhipuaiChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"},"name":{"type":"string"}},"required":["role","content"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}},"required":["type","image_url"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}}]},"name":{"type":"string"}},"required":["role","content"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"nullable":true,"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"required":["id","type","function"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"function_call":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]}},"required":["role"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"type":"string"},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["function"]},"content":{"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://docs.z.ai/api-reference/llm/chat-completion#body\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}},"required":["type","function"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},"request_id":{"type":"string"},"do_sample":{"type":"boolean"},"stream":{"type":"boolean"},"thinking":{"type":"object","properties":{"type":{"type":"string","enum":["enabled","disabled"]},"clear_thinking":{"type":"boolean"}},"required":["type"]},"temperature":{"nullable":true,"type":"number"},"top_p":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"tool_stream":{"type":"boolean"},"stop":{"type":"array","items":{"type":"string"}},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"]},"user_id":{"type":"string"}},"required":["model","messages"]},"ZhipuaiChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"request_id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","sensitive","network_error"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"reasoning_content":{"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"required":["id","type","function"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]}},"required":["role"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"required":["finish_reason","message"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"prompt_tokens_details":{"description":"https://docs.z.ai/api-reference/llm/chat-completion#response","type":"object","properties":{"cached_tokens":{"type":"number"}},"required":["cached_tokens"]}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"},"web_search":{"description":"https://docs.z.ai/api-reference/llm/chat-completion#response","type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"link":{"type":"string"},"media":{"type":"string"},"icon":{"type":"string"},"refer":{"type":"string"},"publish_date":{"type":"string"}},"required":["title","content","link","media","icon","refer","publish_date"]}}},"required":["id","choices","created","model","object"]},"DeepSeekChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":{}},"DeepSeekChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"ArchestraChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":{}},"ArchestraChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"MinimaxChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}},"reasoning_details":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}},"required":["role"]},{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"stream":{"type":"boolean"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":1},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"max_tokens":{"nullable":true,"type":"number"},"n":{"type":"number","enum":[1]},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"]},"user":{"type":"string"},"reasoning_split":{"type":"boolean"},"thinking":{"type":"object","properties":{"type":{"type":"string","enum":["enabled","disabled"]}},"required":["type"]},"extra_body":{"type":"object","properties":{"reasoning_split":{"type":"boolean"}}}},"required":["model","messages"]},"MinimaxChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"reasoning_details":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://platform.minimax.io/docs/api-reference/text-openai-api#response"}},"required":["finish_reason","message"],"description":"https://platform.minimax.io/docs/api-reference/text-openai-api#response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"number"}}}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://platform.minimax.io/docs/api-reference/text-openai-api#usage"}},"required":["id","choices","created","model","object"]},"XaiChatCompletionRequestInput":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]}},"required":["type","text"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"]}]}},"required":["type","name"],"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"description":"Your chosen grammar"}},"required":["type","grammar"]}]}},"required":["name"]}},"required":["type","custom"],"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"]}},"required":["type","json_schema"]}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"]},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}}},"user":{"type":"string"}},"required":["model","messages"]},"XaiChatCompletionResponseInput":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"UserConfigFieldDefaultInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"UserConfigFieldInput":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","directory","file"]},"title":{"type":"string"},"description":{"type":"string"},"promptOnInstallation":{"type":"boolean"},"required":{"type":"boolean"},"default":{"allOf":[{"$ref":"#/components/schemas/UserConfigFieldDefaultInput"}]},"multiple":{"type":"boolean"},"sensitive":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"headerName":{"type":"string"},"valuePrefix":{"type":"string"}},"required":["type","title","description"]},"InteractionVirtualKeyInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"scope":{"type":"string","enum":["personal","team","org"]},"keyType":{"type":"string","enum":["standard","passthrough"]},"tokenStart":{"type":"string"},"ownerUserId":{"nullable":true,"type":"string"},"ownerUserName":{"nullable":true,"type":"string"},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"createdByUserName":{"nullable":true,"type":"string"}},"required":["id","name","scope","keyType","tokenStart","ownerUserId","ownerUserName","teams","createdByUserName"]},"LogContentNotStored":{"type":"object","properties":{"__redacted":{"type":"string","enum":["log_content_policy"]},"isError":{"type":"boolean"},"errorType":{"type":"string","enum":["auth_required","auth_expired","assigned_credential_unavailable","tool_state","cancelled","generic"]},"archestraExecutedAs":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["personal"]},"ownerUserId":{"nullable":true,"type":"string"},"ownerName":{"nullable":true,"type":"string"}},"required":["kind","ownerUserId","ownerName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team"]},"teamId":{"type":"string"},"teamName":{"nullable":true,"type":"string"}},"required":["kind","teamId","teamName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["org"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["idp_exchange"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["idp_passthrough"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["caller_headers"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["platform"]},"callerUserId":{"nullable":true,"type":"string"}},"required":["kind","callerUserId"],"additionalProperties":false}]}},"required":["__redacted"],"additionalProperties":false},"TextSearchLanguage":{"type":"string","enum":["simple","arabic","armenian","basque","catalan","danish","dutch","english","finnish","french","german","greek","hindi","hungarian","indonesian","irish","italian","lithuanian","nepali","norwegian","portuguese","romanian","russian","serbian","spanish","swedish","tamil","turkish","yiddish"]},"ContextualRetrievalMode":{"type":"string","enum":["disabled","document","chunk"]},"EmbeddingDimensions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"enum":[3072,1536,1408,1024,768,384]},"LocalConfigEnvironmentDefault":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"OpenAiChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":false},"OpenAiChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":false},"GeminiGenerateContentRequest":{"type":"object","properties":{"contents":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","description":"The role of the author of this content."},"parts":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"text":{"type":"string"},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"inlineData":{"type":"object","properties":{"mimeType":{"type":"string"},"data":{"type":"string"}},"required":["data"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["inlineData"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionCall":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionCall"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"response":{"type":"object","additionalProperties":{}},"willContinue":{"type":"boolean"},"scheduling":{"type":"string","enum":["SCHEDULING_UNSPECIFIED","SILENT","WHEN_IDLE","INTERRUPT"]}},"required":["name","response"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionResponse"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"fileData":{"type":"object","properties":{"mimeType":{"type":"string"},"fileUri":{"type":"string"}},"required":["fileUri"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["fileData"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"language":{"type":"string","enum":["LANGUAGE_UNSPECIFIED","PYTHON"]},"executableCode":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["language","executableCode"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"codeExecutionResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["OUTCOME_UNSPECIFIED","OUTCOME_OK","OUTCOME_FAILED","OUTCOME_DEADLINE_EXCEEDED"],"description":"Outcome of the code execution."},"output":{"type":"string"}},"required":["outcome"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["codeExecutionResult"],"additionalProperties":false}]}],"description":"https://ai.google.dev/api/caching#Part"}}},"required":["role","parts"],"additionalProperties":false,"description":"\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"},"description":"The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request"},"tools":{"description":"A list of Tools the Model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the Model. Supported Tools are Function and codeExecution. Refer to the Function calling and the Code execution guides to learn more.","anyOf":[{"type":"array","items":{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"additionalProperties":false,"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"additionalProperties":false,"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}},{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"additionalProperties":false,"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"additionalProperties":false,"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}]},"toolConfig":{"description":"Tool configuration for any Tool specified in the request.","type":"object","properties":{"functionCallingConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["AUTO","ANY","NONE"]},"allowedFunctionNames":{"type":"array","items":{"type":"string"}}},"required":["mode"],"additionalProperties":false}},"required":["functionCallingConfig"],"additionalProperties":false},"safetySettings":{"description":"A list of unique SafetySetting instances for blocking unsafe content.","type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_DEROGATORY","HARM_CATEGORY_TOXICITY","HARM_CATEGORY_VIOLENCE","HARM_CATEGORY_SEXUAL","HARM_CATEGORY_MEDICAL","HARM_CATEGORY_DANGEROUS","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY"],"description":"\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"},"threshold":{"type":"string","enum":["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"],"description":"\n      Controls the probability threshold at which harm is blocked.\n\n      https://ai.google.dev/api/generate-content#HarmBlockThreshold\n      "}},"required":["category","threshold"],"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.SafetySetting"}},"systemInstruction":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}}},"required":["parts"],"additionalProperties":false,"description":"Developer set system instruction(s). Currently, text only."},"generationConfig":{"type":"object","properties":{"stopSequences":{"type":"array","items":{"type":"string"}},"responseMimeType":{"type":"string"},"responseSchema":{},"_responseJsonSchema":{},"responseJsonSchema":{},"responseModalities":{"type":"array","items":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"}},"candidateCount":{"type":"number"},"maxOutputTokens":{"type":"number"},"temperature":{"type":"number"},"topP":{"type":"number"},"topK":{"type":"number"},"seed":{"type":"number"},"presencePenalty":{"type":"number"},"frequencyPenalty":{"type":"number"},"responseLogprobs":{"type":"boolean"},"logProbs":{"type":"number"},"enableEnhancedCivicAnswers":{"type":"boolean"},"speechConfig":{},"thinkingConfig":{},"imageConfig":{},"mediaResolution":{"description":"https://ai.google.dev/api/generate-content#MediaResolution","type":"string","enum":["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]}},"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.GenerationConfig"},"cachedContent":{"description":"The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}","type":"string"},"config":{"type":"object","properties":{"tools":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"additionalProperties":false,"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"additionalProperties":false,"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}},{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."},"description":{"type":"string","description":"A brief description of the function."},"behavior":{"description":"https://ai.google.dev/api/caching#Behavior","type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"]},"parameters":{"description":"Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.","type":"object","additionalProperties":{}},"parametersJsonSchema":{},"response":{},"responseJsonSchema":{}},"required":["name","description"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#FunctionDeclaration"}},"googleSearchRetrieval":{"type":"object","properties":{"dynamicRetrievalConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","MODE_DYNAMIC"],"description":"https://ai.google.dev/api/caching#Mode"},"dynamicThreshold":{"type":"number"}},"required":["mode","dynamicThreshold"],"additionalProperties":false,"description":"\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "}},"required":["dynamicRetrievalConfig"],"additionalProperties":false,"description":"https://ai.google.dev/api/caching#GoogleSearchRetrieval"},"codeExecution":{},"googleSearch":{},"urlContext":{},"googleMaps":{},"enterpriseWebSearch":{},"fileSearch":{}},"additionalProperties":false,"description":"\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"}]},"toolConfig":{"description":"Tool configuration for any Tool specified in the request.","type":"object","properties":{"functionCallingConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["AUTO","ANY","NONE"]},"allowedFunctionNames":{"type":"array","items":{"type":"string"}}},"required":["mode"],"additionalProperties":false}},"required":["functionCallingConfig"],"additionalProperties":false}},"additionalProperties":false}},"required":["contents"],"additionalProperties":false},"GeminiGenerateContentResponse":{"type":"object","properties":{"candidates":{"description":"Candidate responses from the model","type":"array","items":{"type":"object","properties":{"content":{"type":"object","properties":{"role":{"type":"string","description":"The role of the author of this content."},"parts":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"text":{"type":"string"},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"inlineData":{"type":"object","properties":{"mimeType":{"type":"string"},"data":{"type":"string"}},"required":["data"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["inlineData"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionCall":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionCall"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"functionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"response":{"type":"object","additionalProperties":{}},"willContinue":{"type":"boolean"},"scheduling":{"type":"string","enum":["SCHEDULING_UNSPECIFIED","SILENT","WHEN_IDLE","INTERRUPT"]}},"required":["name","response"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["functionResponse"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"fileData":{"type":"object","properties":{"mimeType":{"type":"string"},"fileUri":{"type":"string"}},"required":["fileUri"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["fileData"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"language":{"type":"string","enum":["LANGUAGE_UNSPECIFIED","PYTHON"]},"executableCode":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["language","executableCode"],"additionalProperties":false},{"type":"object","properties":{"thought":{"description":"Indicates if the part is thought from the model","type":"boolean"},"thoughtSignature":{"description":"An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string","type":"string"},"codeExecutionResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["OUTCOME_UNSPECIFIED","OUTCOME_OK","OUTCOME_FAILED","OUTCOME_DEADLINE_EXCEEDED"],"description":"Outcome of the code execution."},"output":{"type":"string"}},"required":["outcome"],"additionalProperties":false},"metadata":{"description":"https://ai.google.dev/api/caching#PartMetadata","anyOf":[{"type":"object","properties":{"startOffset":{"description":"The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"endOffset":{"description":"The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'","type":"string"},"fps":{"description":"The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]","type":"number"}},"additionalProperties":false,"description":"https://ai.google.dev/api/caching#VideoMetadata"}]}},"required":["codeExecutionResult"],"additionalProperties":false}]}],"description":"https://ai.google.dev/api/caching#Part"}}},"required":["role","parts"],"additionalProperties":false,"description":"\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"},"finishReason":{"description":"\n  The reason why the model stopped generating tokens.\n\n  If empty, the model has not stopped generating tokens.\n\n  https://ai.google.dev/api/generate-content#FinishReason\n","anyOf":[{"type":"string","enum":["FINISH_REASON_UNSPECIFIED","STOP","MAX_TOKENS","SAFETY","RECITATION","LANGUAGE","OTHER","BLOCKLIST","PROHIBITED_CONTENT","SPII","MALFORMED_FUNCTION_CALL","IMAGE_SAFETY","IMAGE_PROHIBITED_CONTENT","IMAGE_OTHER","NO_IMAGE","IMAGE_RECITATION","UNEXPECTED_TOOL_CALL","TOO_MANY_TOOL_CALLS"]},{"type":"string"}]},"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_DEROGATORY","HARM_CATEGORY_TOXICITY","HARM_CATEGORY_VIOLENCE","HARM_CATEGORY_SEXUAL","HARM_CATEGORY_MEDICAL","HARM_CATEGORY_DANGEROUS","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY"],"description":"\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"},"probability":{"type":"string","enum":["HARM_PROBABILITY_UNSPECIFIED","NEGLIGIBLE","LOW","MEDIUM","HIGH"],"description":"https://ai.google.dev/api/generate-content#HarmProbability"},"blocked":{"description":"Was this content blocked because of this rating?","type":"boolean"}},"required":["category","probability"],"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.SafetyRating"}},"citationMetadata":{"description":"https://ai.google.dev/api/generate-content#citationmetadata","type":"object","properties":{"citationSources":{"type":"array","items":{"description":"https://ai.google.dev/api/generate-content#CitationSource","type":"object","properties":{"startIndex":{"type":"number"},"endIndex":{"type":"number"},"uri":{"type":"string"},"license":{"type":"string"}},"additionalProperties":false}}},"required":["citationSources"],"additionalProperties":false},"tokenCount":{"type":"number"},"groundingAttributions":{"type":"array","items":{}},"groundingMetadata":{},"avgLogprobs":{"type":"number"},"logprobsResult":{},"urlContextMetadata":{},"index":{"description":"Index of the candidate in the list of response candidates.","type":"number"},"finishMessage":{"description":"Details the reason why the model stopped generating tokens. This is populated only when finishReason is set.","type":"string"}},"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#candidate"}},"promptFeedback":{"description":"Returns the prompt's feedback related to the content filters","type":"object","properties":{"blockReason":{"description":"Specifies the reason why the prompt was blocked. https://ai.google.dev/api/generate-content#BlockReason","anyOf":[{"type":"string","enum":["BLOCK_REASON_UNSPECIFIED","SAFETY","OTHER","BLOCKLIST","PROHIBITED_CONTENT","IMAGE_SAFETY"]},{"type":"string"}]},"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_DEROGATORY","HARM_CATEGORY_TOXICITY","HARM_CATEGORY_VIOLENCE","HARM_CATEGORY_SEXUAL","HARM_CATEGORY_MEDICAL","HARM_CATEGORY_DANGEROUS","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY"],"description":"\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"},"probability":{"type":"string","enum":["HARM_PROBABILITY_UNSPECIFIED","NEGLIGIBLE","LOW","MEDIUM","HIGH"],"description":"https://ai.google.dev/api/generate-content#HarmProbability"},"blocked":{"description":"Was this content blocked because of this rating?","type":"boolean"}},"required":["category","probability"],"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.SafetyRating"}}},"additionalProperties":false},"usageMetadata":{"description":"Metadata on the generation requests' token usage","type":"object","properties":{"trafficType":{"description":"Traffic tier that served the request.","type":"string"},"promptTokenCount":{"type":"number"},"cachedContentTokenCount":{"type":"number"},"candidatesTokenCount":{"type":"number"},"toolUsePromptTokenCount":{"type":"number"},"thoughtsTokenCount":{"type":"number"},"totalTokenCount":{"type":"number"},"promptTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}},"cacheTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}},"candidatesTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}},"toolUsePromptTokensDetails":{"type":"array","items":{"type":"object","properties":{"modality":{"type":"string","enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"description":"https://ai.google.dev/api/generate-content#Modality"},"tokenCount":{"type":"number","description":"Number of tokens"}},"required":["modality","tokenCount"],"additionalProperties":false,"description":"https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"}}},"additionalProperties":false},"modelVersion":{"description":"The model version used to generate the response.","type":"string"},"responseId":{"description":"The unique response ID.","type":"string"}},"additionalProperties":false},"AnthropicMessagesRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"nullable":true}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["application/pdf"]},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"media_type":{"type":"string","enum":["text/plain"]},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["content"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"nullable":true}},"required":["type","source"],"additionalProperties":false}]}}]}},"required":["type","content"],"additionalProperties":false}]},"title":{"nullable":true,"type":"string"},"context":{"nullable":true,"type":"string"},"citations":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"cache_control":{"nullable":true}},"required":["type","source"],"additionalProperties":false,"description":"Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking","signature"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"]},"data":{"type":"string"}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"input":{},"name":{"type":"string"},"type":{"type":"string","enum":["tool_use"]},"cache_control":{"nullable":true}},"required":["id","input","name","type"],"additionalProperties":false},{"type":"object","properties":{"tool_use_id":{"type":"string"},"type":{"type":"string","enum":["tool_result"]},"cache_control":{"nullable":true},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"nullable":true}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["application/pdf"]},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"media_type":{"type":"string","enum":["text/plain"]},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["content"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["text","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"nullable":true}},"required":["type","source"],"additionalProperties":false}]}}]}},"required":["type","content"],"additionalProperties":false}]},"title":{"nullable":true,"type":"string"},"context":{"nullable":true,"type":"string"},"citations":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"cache_control":{"nullable":true}},"required":["type","source"],"additionalProperties":false,"description":"Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"}]}}]},"is_error":{"type":"boolean"}},"required":["tool_use_id","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["search_result","server_tool_use","web_search_tool_result","web_fetch_tool_result","code_execution_tool_result","bash_code_execution_tool_result","text_editor_code_execution_tool_result","tool_search_tool_result","container_upload"]}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}}]},"role":{"type":"string","enum":["user","assistant","system"]}},"required":["content","role"],"additionalProperties":false}},"max_tokens":{"type":"number"},"container":{"nullable":true,"type":"string"},"context_management":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}},"mcp_servers":{"type":"array","items":{}},"metadata":{"type":"object","properties":{"user_id":{"nullable":true,"type":"string"}},"additionalProperties":{}},"output_config":{"type":"object","properties":{"effort":{"nullable":true,"type":"string"},"format":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"schema":{"type":"object","additionalProperties":{}}},"required":["type","schema"],"additionalProperties":false}},"additionalProperties":{}},"service_tier":{},"speed":{"type":"string","enum":["fast","standard"]},"stop_sequences":{"type":"array","items":{"type":"string"}},"stream":{"type":"boolean"},"system":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["type","text"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"nullable":true},"citations":{"nullable":true,"type":"array","items":{}}},"required":["type","text"],"additionalProperties":{}}}]},"temperature":{"type":"number"},"thinking":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["enabled"]},"budget_tokens":{"type":"number"},"display":{"nullable":true,"type":"string","enum":["summarized","omitted","updates"]},"block_binding":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["type","budget_tokens"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["disabled"]}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["between_tools"]}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","enum":["adaptive"]},"display":{"nullable":true,"type":"string","enum":["summarized","omitted","updates"]},"block_binding":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]},"tool_choice":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string"},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false}]},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"type":{"nullable":true,"type":"string","enum":["custom"]},"cache_control":{"nullable":true},"input_schema":{"type":"object","additionalProperties":{}},"description":{"type":"string"}},"required":["name","input_schema"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["bash"]},"type":{"type":"string","enum":["bash_20250124"]},"cache_control":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["str_replace_editor"]},"type":{"type":"string","enum":["text_editor_20250124"]},"cache_control":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["str_replace_based_edit_tool"]},"type":{"type":"string","enum":["text_editor_20250429"]},"cache_control":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["str_replace_based_edit_tool"]},"type":{"type":"string","enum":["text_editor_20250728"]},"cache_control":{"nullable":true},"max_characters":{"nullable":true,"type":"number"}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"name":{"type":"string","enum":["web_search"]},"type":{"type":"string","enum":["web_search_20250305"]},"allowed_domains":{"nullable":true,"type":"array","items":{"type":"string"}},"blocked_domains":{"nullable":true,"type":"array","items":{"type":"string"}},"cache_control":{"nullable":true},"max_uses":{"nullable":true,"type":"number"},"user_location":{"nullable":true}},"required":["name","type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}},"top_k":{"type":"number"},"top_p":{"type":"number"}},"required":["model","messages","max_tokens"],"additionalProperties":{}},"AnthropicMessagesResponse":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"citations":{"nullable":true,"type":"array","items":{}},"text":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["citations","text","type"],"additionalProperties":{}},{"type":"object","properties":{"id":{"type":"string"},"input":{},"name":{"type":"string"},"type":{"type":"string","enum":["tool_use"]}},"required":["id","input","name","type"],"additionalProperties":{}}]}},"model":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"stop_reason":{"nullable":true},"stop_sequence":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["message"]},"usage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_read_input_tokens":{"nullable":true,"type":"number"},"cache_creation_input_tokens":{"nullable":true,"type":"number"},"cache_creation":{"nullable":true,"type":"object","properties":{"ephemeral_1h_input_tokens":{"nullable":true,"type":"number"},"ephemeral_5m_input_tokens":{"nullable":true,"type":"number"}},"additionalProperties":false}},"required":["input_tokens","output_tokens"],"additionalProperties":{}}},"required":["id","content","model","role","type","usage"],"additionalProperties":{}},"CerebrasChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":false},"CerebrasChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":false},"CohereChatRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false}},"required":["type","image_url"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"content":{"type":"string"}},"required":["type","tool_call_id","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"}},"required":["type","thinking"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}}]},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}}},"required":["role"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"tool_call_id":{"type":"string"},"content":{"type":"string"}},"required":["role","tool_call_id","content"],"additionalProperties":false}]}},"stream":{"type":"boolean"},"temperature":{"type":"number"},"max_tokens":{"type":"number"},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"required":{"type":"array","items":{"type":"string"}},"properties":{"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":false}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}},"tool_choice":{"type":"string","enum":["REQUIRED","NONE"]},"safety_mode":{"type":"string","enum":["CONTEXTUAL","STRICT","OFF"]},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["json_object","text"]},"json_schema":{"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":false},"frequency_penalty":{"type":"number"},"presence_penalty":{"type":"number"},"k":{"type":"number"},"p":{"type":"number"},"seed":{"type":"number"},"stop_sequences":{"type":"array","items":{"type":"string"}},"logprobs":{"type":"boolean"}},"required":["model","messages"],"additionalProperties":false},"CohereChatResponse":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"content":{"type":"string"}},"required":["type","tool_call_id","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"}},"required":["type","thinking"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}]}},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}}},"required":["role"],"additionalProperties":false},"finish_reason":{"anyOf":[{"type":"string","enum":["COMPLETE","MAX_TOKENS","STOP_SEQUENCE","TOOL_CALL","ERROR"]},{"type":"string"}]},"usage":{"type":"object","properties":{"billed_units":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"}},"additionalProperties":false},"tokens":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false}},"required":["id","message","finish_reason"],"additionalProperties":false},"MistralChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":false},"MistralChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"PerplexityChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"},"stream_mode":{"type":"string","enum":["full","concise"]}},"required":["model","messages"],"additionalProperties":false},"PerplexityChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"GroqChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":false},"GroqChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"OpenrouterChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}]}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object","json_schema"]}},"required":["type"],"additionalProperties":{}},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"},"effort":{"type":"string"},"max_tokens":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"exclude":{"type":"boolean"}},"additionalProperties":false}},"required":["model","messages"],"additionalProperties":false},"OpenrouterChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"JevDecisionsRequest":{"type":"object","properties":{"model":{"type":"string"},"state":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"The content the questions are about"},"questions":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"Question kind: noul, choice, or score"},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"criteria":{}},"required":["type","instructions","criteria"],"additionalProperties":{}},"description":"Decision questions keyed by name"}},"required":["model","state","questions"],"additionalProperties":{}},"JevDecisionsResponse":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"answers":{"type":"object","additionalProperties":{}},"usage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cost":{"type":"number"}},"additionalProperties":{}}},"required":["answers"],"additionalProperties":{}},"VllmChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"A developer message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"A system message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"Image URL details"}},"required":["type","image_url"],"additionalProperties":false,"description":"An image content part"},{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"Audio input details"}},"required":["type","input_audio"],"additionalProperties":false,"description":"An audio content part"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"File details"}},"required":["type","file"],"additionalProperties":false,"description":"A file content part"}],"description":"A content part in a message"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"A user message"},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"A refusal content part"}}]},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"Function call details"}},"required":["id","type","function"],"additionalProperties":false,"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"Custom tool call details"}},"required":["id","type","custom"],"additionalProperties":false,"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}},"reasoning":{"nullable":true,"type":"string"},"reasoning_content":{"nullable":true,"type":"string"}},"required":["role"],"additionalProperties":false,"description":"An assistant message"},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"Image URL details"}},"required":["type","image_url"],"additionalProperties":false,"description":"An image content part"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"A tool result message"},{"type":"object","properties":{"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"A function result message (deprecated)"}],"description":"A message in the conversation"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"A function definition for tool calling"}},"required":["type","function"],"additionalProperties":false,"description":"A function tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"],"additionalProperties":false}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"A custom tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"A custom tool in the flat Responses-API shape (see the OpenAI provider's ResponsesStyleCustomToolSchema)"}],"description":"A tool definition"}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"A function definition for tool calling"}},"required":["type","function"],"additionalProperties":false,"description":"A function tool definition"}}}},"required":["mode","tools"],"additionalProperties":false,"description":"Allowed tools configuration"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"Allowed tool choice configuration"},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"Named function tool choice"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"],"additionalProperties":false}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"A custom tool definition"}],"description":"Tool choice option"},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"stream":{"nullable":true,"type":"boolean"},"top_p":{"nullable":true,"type":"number"},"top_k":{"nullable":true,"type":"number"},"frequency_penalty":{"nullable":true,"type":"number"},"presence_penalty":{"nullable":true,"type":"number"},"repetition_penalty":{"nullable":true,"type":"number"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"seed":{"nullable":true,"type":"number"},"n":{"nullable":true,"type":"number"},"best_of":{"nullable":true,"type":"number"},"logprobs":{"nullable":true,"type":"boolean"},"top_logprobs":{"nullable":true,"type":"number"},"chat_template_kwargs":{"type":"object","additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string"}},"required":["model","messages"],"additionalProperties":false},"VllmChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"Function call details"}},"required":["id","type","function"],"additionalProperties":false,"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"Custom tool call details"}},"required":["id","type","custom"],"additionalProperties":false,"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}},"reasoning":{"nullable":true,"type":"string"},"reasoning_content":{"nullable":true,"type":"string"}},"required":["role"],"additionalProperties":false,"description":"The assistant message in the response"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"A choice in the chat completion response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{},"prompt_tokens_details":{}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"Token usage statistics for the completion"}},"required":["id","choices","created","model","object"],"additionalProperties":false},"OllamaChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"A developer message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"A system message"},{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"Image URL details"}},"required":["type","image_url"],"additionalProperties":false,"description":"An image content part"},{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"Audio input details"}},"required":["type","input_audio"],"additionalProperties":false,"description":"An audio content part"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"File details"}},"required":["type","file"],"additionalProperties":false,"description":"A file content part"}],"description":"A content part in a message"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"A user message"},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"A refusal content part"}}]},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"Function call details"}},"required":["id","type","function"],"additionalProperties":false,"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"Custom tool call details"}},"required":["id","type","custom"],"additionalProperties":false,"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}}},"required":["role"],"additionalProperties":false,"description":"An assistant message"},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"A text content part"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"Image URL details"}},"required":["type","image_url"],"additionalProperties":false,"description":"An image content part"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"A tool result message"},{"type":"object","properties":{"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"A function result message (deprecated)"}],"description":"A message in the conversation"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"A function definition for tool calling"}},"required":["type","function"],"additionalProperties":false,"description":"A function tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"],"additionalProperties":false}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"A custom tool definition"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"A custom tool in the flat Responses-API shape (see the OpenAI provider's ResponsesStyleCustomToolSchema)"}],"description":"A tool definition"}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"A function definition for tool calling"}},"required":["type","function"],"additionalProperties":false,"description":"A function tool definition"}}}},"required":["mode","tools"],"additionalProperties":false,"description":"Allowed tools configuration"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"Allowed tool choice configuration"},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"Named function tool choice"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool"},"description":{"description":"Description of the tool","type":"string"},"format":{"description":"The input format for the custom tool","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar"}},"required":["definition","syntax"],"additionalProperties":false}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"A custom tool definition"}],"description":"Tool choice option"},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"stream":{"nullable":true,"type":"boolean"},"top_p":{"nullable":true,"type":"number"},"frequency_penalty":{"nullable":true,"type":"number"},"presence_penalty":{"nullable":true,"type":"number"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"seed":{"nullable":true,"type":"number"},"n":{"nullable":true,"type":"number"},"reasoning_effort":{"nullable":true,"type":"string"}},"required":["model","messages"],"additionalProperties":false},"OllamaChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"Function call details"}},"required":["id","type","function"],"additionalProperties":false,"description":"A function tool call in the message"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"Custom tool call details"}},"required":["id","type","custom"],"additionalProperties":false,"description":"A custom tool call in the message"}],"description":"A tool call in the assistant message"}}},"required":["role"],"additionalProperties":false,"description":"The assistant message in the response"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"A choice in the chat completion response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{},"prompt_tokens_details":{}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"Token usage statistics for the completion"}},"required":["id","choices","created","model","object"],"additionalProperties":false},"OllamaNativeChatRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}}]},"thinking":{"type":"string"},"images":{"type":"array","items":{"type":"string"}},"tool_calls":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"function":{"type":"object","properties":{"index":{"type":"number"},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]}},"required":["name","arguments"],"additionalProperties":{}}},"required":["function"],"additionalProperties":{}}},"tool_name":{"type":"string"},"tool_call_id":{"type":"string"}},"required":["role"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":{}}},"required":["type","function"],"additionalProperties":{}}},"format":{},"options":{"type":"object","properties":{"temperature":{"type":"number"},"top_k":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"top_p":{"type":"number"},"min_p":{"type":"number"},"typical_p":{"type":"number"},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repeat_penalty":{"type":"number"},"repeat_last_n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"},"stop":{"maxItems":16,"type":"array","items":{"type":"string","maxLength":256}},"num_keep":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"num_ctx":{"type":"integer","minimum":1,"maximum":10000000},"num_predict":{"type":"integer","minimum":-2,"maximum":9007199254740991}},"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"keep_alive":{},"think":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"temperature":{"nullable":true,"type":"number"},"top_p":{"nullable":true,"type":"number"},"max_output_tokens":{"nullable":true,"type":"number"},"truncate":{"type":"boolean"},"shift":{"type":"boolean"}},"required":["model","messages"],"additionalProperties":{}},"OllamaNativeChatResponse":{"type":"object","properties":{"model":{"type":"string"},"created_at":{"type":"string"},"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"},"thinking":{"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"function":{"type":"object","properties":{"index":{"type":"number"},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]}},"required":["name","arguments"],"additionalProperties":{}}},"required":["function"],"additionalProperties":{}}}},"required":["role"],"additionalProperties":{}},"done":{"type":"boolean"},"done_reason":{"type":"string"},"total_duration":{"type":"number"},"load_duration":{"type":"number"},"prompt_eval_count":{"type":"number"},"prompt_eval_duration":{"type":"number"},"eval_count":{"type":"number"},"eval_duration":{"type":"number"}},"required":["model","message","done"],"additionalProperties":{}},"ZhipuaiChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}}]},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"nullable":true,"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"function_call":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false}},"required":["role"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"type":"string"},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},{"type":"object","properties":{"role":{"type":"string","enum":["function"]},"content":{"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://docs.z.ai/api-reference/llm/chat-completion#body\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}},"required":["type","function"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#body"},"request_id":{"type":"string"},"do_sample":{"type":"boolean"},"stream":{"type":"boolean"},"thinking":{"type":"object","properties":{"type":{"type":"string","enum":["enabled","disabled"]},"clear_thinking":{"type":"boolean"}},"required":["type"],"additionalProperties":false},"temperature":{"nullable":true,"type":"number"},"top_p":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"tool_stream":{"type":"boolean"},"stop":{"type":"array","items":{"type":"string"}},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"],"additionalProperties":false},"user_id":{"type":"string"}},"required":["model","messages"],"additionalProperties":false},"ZhipuaiChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"request_id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","sensitive","network_error"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"reasoning_content":{"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}],"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"function_call":{"nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false}},"required":["role"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"prompt_tokens_details":{"description":"https://docs.z.ai/api-reference/llm/chat-completion#response","type":"object","properties":{"cached_tokens":{"type":"number"}},"required":["cached_tokens"],"additionalProperties":false}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://docs.z.ai/api-reference/llm/chat-completion#response"},"web_search":{"description":"https://docs.z.ai/api-reference/llm/chat-completion#response","type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"link":{"type":"string"},"media":{"type":"string"},"icon":{"type":"string"},"refer":{"type":"string"},"publish_date":{"type":"string"}},"required":["title","content","link","media","icon","refer","publish_date"],"additionalProperties":false}}},"required":["id","choices","created","model","object"],"additionalProperties":false},"DeepSeekChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":{}},"DeepSeekChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"ArchestraChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":{}},"ArchestraChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"MinimaxChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}},"reasoning_details":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}}},"required":["role"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"stream":{"type":"boolean"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":1},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"max_tokens":{"nullable":true,"type":"number"},"n":{"type":"number","enum":[1]},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"],"additionalProperties":false},"user":{"type":"string"},"reasoning_split":{"type":"boolean"},"thinking":{"type":"object","properties":{"type":{"type":"string","enum":["enabled","disabled"]}},"required":["type"],"additionalProperties":false},"extra_body":{"type":"object","properties":{"reasoning_split":{"type":"boolean"}},"additionalProperties":false}},"required":["model","messages"],"additionalProperties":false},"MinimaxChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"reasoning_details":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://platform.minimax.io/docs/api-reference/text-openai-api#response"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://platform.minimax.io/docs/api-reference/text-openai-api#response"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"number"}},"additionalProperties":false}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://platform.minimax.io/docs/api-reference/text-openai-api#usage"}},"required":["id","choices","created","model","object"],"additionalProperties":false},"XaiChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["developer"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}}]},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["input_audio"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"}},"required":["type","input_audio"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["file"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"file":{"type":"object","properties":{"file_data":{"type":"string"},"file_id":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"}},"required":["type","file"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["assistant"]},"audio":{"nullable":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"}},{"type":"array","items":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"}}]},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"name":{"type":"string"},"reasoning_content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["image_url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"}},"required":["type","image_url"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"}]}}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"role":{"type":"string","enum":["function"]},"content":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["role","content","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false,"description":"\n  A custom tool in the flat Responses-API shape ('name'/'format' at the top\n  level, grammar fields inlined) rather than Chat Completions' nested 'custom'\n  wrapper. Some clients (e.g. Cursor's ApplyPatch tool) send this shape to\n  /chat/completions and OpenAI accepts it, so the proxy must too.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/responses/responses.ts (CustomTool)\n  "}],"description":"\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["allowed_tools"]},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"}},"required":["type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"}},"description":"A list of tool definitions that the model should be allowed to call"}},"required":["mode","tools"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"}},"required":["type","allowed_tools"],"additionalProperties":false,"description":"\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "},{"type":"object","properties":{"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls"},"description":{"description":"Optional description of the custom tool, used to provide more context","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`"}},"required":["type"],"additionalProperties":false,"description":"Unconstrained free-form text"},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"definition":{"type":"string","description":"The grammar definition"},"syntax":{"type":"string","enum":["lark","regex"],"description":"The syntax of the grammar definition"}},"required":["definition","syntax"],"additionalProperties":false,"description":"Your chosen grammar"}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false,"description":"\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"nullable":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"temperature":{"nullable":true,"type":"number"},"max_tokens":{"nullable":true,"type":"number"},"max_completion_tokens":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"prompt_cache_key":{"nullable":true,"type":"string"},"prompt_cache_retention":{"nullable":true,"type":"string","enum":["in-memory","24h"]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string"}},"additionalProperties":{}},"reasoning_effort":{"nullable":true,"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"modalities":{"nullable":true,"type":"array","items":{"type":"string","enum":["text","audio"]}},"audio":{"nullable":true,"type":"object","properties":{"voice":{"type":"string"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"]}},"required":["voice","format"],"additionalProperties":false},"stream":{"nullable":true,"type":"boolean"},"stream_options":{"nullable":true,"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":false},"XaiChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"string"}]},"index":{"type":"number"},"logprobs":{"nullable":true},"message":{"type":"object","properties":{"content":{"nullable":true,"type":"string"},"refusal":{"nullable":true,"type":"string"},"role":{"type":"string","enum":["assistant"]},"annotations":{"nullable":true,"type":"array","items":{}},"audio":{"nullable":true},"function_call":{"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431","nullable":true,"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false},"reasoning_content":{"nullable":true,"type":"string"},"tool_calls":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"}},"required":["id","type","function"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"input":{"type":"string"},"name":{"type":"string"}},"required":["input","name"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"}},"required":["id","type","custom"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"}],"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"}}},"required":["role"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"}},"required":["finish_reason","message"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"}},"created":{"type":"number"},"model":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"server_tier":{"type":"string"},"system_fingerprint":{"nullable":true,"type":"string"},"usage":{"type":"object","properties":{"completion_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"total_tokens":{"type":"number"},"completion_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"},"prompt_tokens_details":{"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"}},"required":["completion_tokens","prompt_tokens","total_tokens"],"additionalProperties":false,"description":"https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"}},"required":["id","choices","created","model","object"],"additionalProperties":{}},"UserConfigFieldDefault":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"UserConfigField":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","directory","file"]},"title":{"type":"string"},"description":{"type":"string"},"promptOnInstallation":{"type":"boolean"},"required":{"type":"boolean"},"default":{"allOf":[{"$ref":"#/components/schemas/UserConfigFieldDefault"}]},"multiple":{"type":"boolean"},"sensitive":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"headerName":{"type":"string"},"valuePrefix":{"type":"string"}},"required":["type","title","description"],"additionalProperties":false},"InteractionVirtualKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"scope":{"type":"string","enum":["personal","team","org"]},"keyType":{"type":"string","enum":["standard","passthrough"]},"tokenStart":{"type":"string"},"ownerUserId":{"nullable":true,"type":"string"},"ownerUserName":{"nullable":true,"type":"string"},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdByUserName":{"nullable":true,"type":"string"}},"required":["id","name","scope","keyType","tokenStart","ownerUserId","ownerUserName","teams","createdByUserName"],"additionalProperties":false}}},"paths":{"/api/apps":{"get":{"operationId":"getApps","tags":["Apps"],"description":"List apps visible to the caller (paginated).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["personal","team","org"]},"in":"query","name":"scope","required":false},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"authorIds","required":false},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"excludeAuthorIds","required":false},{"schema":{"type":"string"},"in":"query","name":"labels","required":false,"description":"Filter by labels. Format: key1:val1|val2;key2:val3. AND across keys, OR within values."},{"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["mine","shared","org","others"]}},"in":"query","name":"access","required":false,"description":"Keep only objects the caller reaches in one of these ways (comma-separated): mine (authored by the caller), shared (shared with the caller or one of their teams), org (shared with the organization), others (visible only through organization-wide authority). Omit for every readable object."},{"schema":{"minItems":1,"type":"array","items":{"type":"string"}},"in":"query","name":"sharedWith","required":false,"description":"Keep only objects whose own permissions grant read to one of these subjects (comma-separated): org (the whole organization), role:<roleId>, team:<teamId>, user:<userId>, serviceAccount:<serviceAccountId>. Grants inherited from organization-wide permissions do not count. Omit for no filtering."},{"schema":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"in":"query","name":"owner","required":false,"description":"Keep only objects authored by one of these user IDs (comma-separated). Narrows the rows the caller can already read. Omit for no filtering."},{"schema":{"type":"boolean"},"in":"query","name":"pinned","required":false,"description":"Only return apps the current user has pinned."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"executionModel":{"type":"string","enum":["viewer-scoped","server-scoped"]},"cspOrigin":{"type":"string","enum":["platform-pinned","author-declared"]},"pinnedAt":{"nullable":true,"type":"string","format":"date-time"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"icon":{"nullable":true,"type":"string"},"iconUrl":{"nullable":true,"type":"string"},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"source":{"type":"string","enum":["owned"]},"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"scope":{"type":"string","enum":["personal","team","org"]},"authorId":{"nullable":true,"type":"string"},"authorName":{"nullable":true,"type":"string"},"viewerRole":{"type":"string","enum":["owner","shared","admin"]},"latestVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enabled":{"type":"boolean"},"locked":{"type":"boolean"},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["name","description","executionModel","cspOrigin","pinnedAt","labels","icon","iconUrl","createdBy","source","id","slug","scope","authorId","authorName","viewerRole","latestVersion","enabled","locked","teams","users"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"executionModel":{"type":"string","enum":["viewer-scoped","server-scoped"]},"cspOrigin":{"type":"string","enum":["platform-pinned","author-declared"]},"pinnedAt":{"nullable":true,"type":"string","format":"date-time"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"icon":{"nullable":true,"type":"string"},"iconUrl":{"nullable":true,"type":"string"},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"source":{"type":"string","enum":["external"]},"catalogId":{"type":"string"},"mcpServerId":{"type":"string"},"scope":{"type":"string","enum":["personal","team","org"]},"resourceUri":{"type":"string"},"toolName":{"type":"string"},"requiresInput":{"type":"boolean"}},"required":["name","description","executionModel","cspOrigin","pinnedAt","labels","icon","iconUrl","createdBy","source","catalogId","mcpServerId","scope","resourceUri","toolName","requiresInput"],"additionalProperties":false}]}},"pagination":{"type":"object","properties":{"currentPage":{"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}},"required":["currentPage","limit","total","totalPages","hasNext","hasPrev"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"post":{"operationId":"createApp","tags":["Apps"],"description":"Create a new MCP App.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:create`](/docs/reference/permissions#app:create): Create new MCP Apps","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"initialGrants":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["team"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["serviceAccount"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["role"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["organization"]},"id":{"type":"string","enum":["*"]}},"required":["type","id"]}]},"actions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["read","use","update","delete","manage-permissions","configure-deployment-spec"]}}},"required":["subject","actions"]}},"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","maxLength":500},"html":{"type":"string","minLength":1},"uiPermissions":{"type":"object","properties":{"camera":{"type":"object","properties":{}},"microphone":{"type":"object","properties":{}},"geolocation":{"type":"object","properties":{}},"clipboardWrite":{"type":"object","properties":{}}},"additionalProperties":false},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string","maxLength":1048576},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"]}},"openInChat":{"type":"boolean"}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:create"]}}},"/api/apps/external/{catalogId}":{"get":{"operationId":"getExternalApp","tags":["Apps"],"description":"Resolve an external UI-providing app by catalog id: its UI resource and the caller's accessible installs (for the standalone run page's install selector).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"catalogId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"catalogId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"resourceUri":{"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"resourceUri":{"type":"string"},"toolName":{"type":"string"},"name":{"type":"string"},"requiresInput":{"type":"boolean"}},"required":["resourceUri","toolName","name","requiresInput"],"additionalProperties":false}},"defaultMcpServerId":{"nullable":true,"type":"string"},"installs":{"type":"array","items":{"type":"object","properties":{"mcpServerId":{"type":"string"},"scope":{"type":"string","enum":["personal","team","org"]},"ownerId":{"nullable":true,"type":"string"},"teamId":{"nullable":true,"type":"string"},"name":{"type":"string"},"localInstallationStatus":{"nullable":true,"type":"string"}},"required":["mcpServerId","scope","ownerId","teamId","name","localInstallationStatus"],"additionalProperties":false}}},"required":["catalogId","name","description","resourceUri","resources","defaultMcpServerId","installs"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:read"]}}},"/api/apps/external/{catalogId}/icon":{"get":{"operationId":"getExternalAppIcon","tags":["Apps"],"description":"The image icon of an external app's backing server, for the apps list, which links image icons instead of carrying them inline.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps","parameters":[{"schema":{"type":"string"},"in":"query","name":"v","required":false,"description":"Content version; any value."},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"catalogId","required":true}],"responses":{"200":{"description":"Default Response"}},"x-required-permissions":{"kind":"static","permissions":["app:read"]}}},"/api/apps/{appId}/icon":{"get":{"operationId":"getAppIcon","tags":["Apps"],"description":"The image icon of an app the caller may view, for the apps list, which links image icons instead of carrying them inline.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string"},"in":"query","name":"v","required":false,"description":"Content version; any value."},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response"}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/labels/keys":{"get":{"operationId":"getAppLabelKeys","tags":["Apps"],"description":"Get all label keys used by apps\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:read"]}}},"/api/apps/labels/values":{"get":{"operationId":"getAppLabelValues","tags":["Apps"],"description":"Get all label values used by apps\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps","parameters":[{"schema":{"type":"string"},"in":"query","name":"key","required":false,"description":"Filter values by label key"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:read"]}}},"/api/app-templates":{"get":{"operationId":"getAppTemplates","tags":["Apps"],"description":"List the curated starter templates a new app can use.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"html":{"type":"string"}},"required":["id","name","description","html"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:read"]}}},"/api/apps/{appId}/open-in-chat":{"post":{"operationId":"openAppInChat","tags":["Apps"],"description":"Open an existing app in chat: create a conversation with the app already rendered (no model turn) and return its id to navigate to.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`chat:create`](/docs/reference/permissions#chat:create): Start new chat conversations","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["conversationId"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["chat:create"]}}},"/api/apps/external/{mcpServerId}/open-in-chat":{"post":{"operationId":"openExternalAppInChat","tags":["Apps"],"description":"Open an external (MCP-server) UI app in chat: create a conversation and return its id to navigate to. When the tool needs no inputs the app is seeded already rendered (no model turn); when it has required inputs the conversation is created empty and the response carries an opening prompt for the client to send.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps\n[`chat:create`](/docs/reference/permissions#chat:create): Start new chat conversations","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceUri":{"type":"string","minLength":1}},"required":["resourceUri"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"mcpServerId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["render","prompt"]},"prompt":{"type":"string"}},"required":["conversationId","mode"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:read","chat:create"]}}},"/api/apps/{appId}/pin":{"put":{"operationId":"pinApp","tags":["Apps"],"description":"Pin an app for the current user (mirrors project pins). Personal — does not affect other members. Any user who can view the app may pin it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"unpinApp","tags":["Apps"],"description":"Remove the current user's pin on an app. Idempotent; intentionally no visibility check, so a stale pin on an app that was since re-scoped away (or deleted) can still be cleared.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/external/{mcpServerId}/pin":{"put":{"operationId":"pinExternalApp","tags":["Apps"],"description":"Pin an external (MCP-server) UI app for the current user, identified by install + resource + tool (several tools of one server can share a UI resource, so the tool name pins one tile, not the group). Personal — does not affect other members.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceUri":{"type":"string","minLength":1},"toolName":{"type":"string","minLength":1}},"required":["resourceUri","toolName"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"mcpServerId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:read"]}},"delete":{"operationId":"unpinExternalApp","tags":["Apps"],"description":"Remove the current user's pin on an external app. Idempotent; intentionally no access check, so a stale pin on an install the user lost access to can still be cleared. `resourceUri` and `toolName` ride the query string (DELETE carries no body).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`app:read`](/docs/reference/permissions#app:read): Open Apps","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"resourceUri","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"toolName","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"mcpServerId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["app:read"]}}},"/api/apps/{appId}":{"get":{"operationId":"getApp","tags":["Apps"],"description":"Get a single app by id or slug, if the caller may view it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"viewerRole":{"type":"string","enum":["owner","shared","admin"]},"authorName":{"nullable":true,"type":"string"}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels","createdBy","teams","users","viewerRole","authorName"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"patch":{"operationId":"updateApp","tags":["Apps"],"description":"Update an app's metadata and/or html (forks a new version).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"baseVersion":{"description":"Expected current content version. A stale value rejects the entire update with 409 before any changes persist.","type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"nullable":true,"type":"string","maxLength":500},"html":{"type":"string","minLength":1},"uiPermissions":{"type":"object","properties":{"camera":{"type":"object","properties":{}},"microphone":{"type":"object","properties":{}},"geolocation":{"type":"object","properties":{}},"clipboardWrite":{"type":"object","properties":{}}},"additionalProperties":false},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string","maxLength":1048576},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"]}},"openInFullscreen":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"deleteApp","tags":["Apps"],"description":"Soft-delete an app the caller owns or administers.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/bulk":{"delete":{"operationId":"bulkDeleteApps","tags":["Apps"],"description":"Soft-delete several apps in one request. Each id is authorized exactly as the single-app delete authorizes its own, so an app the caller cannot see or administer — and a locked app, which is never deletable until unlocked — is reported in `failed` while the rest of the batch still applies.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string"},"description":"Ids to act on. Duplicates are collapsed."}},"required":["ids"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"affected":{"type":"number"},"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"error":{"type":"string"}},"required":["id","name","error"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/enable":{"post":{"operationId":"enableApp","tags":["Apps"],"description":"Enable a disabled app, making it live at its scope.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"viewerRole":{"type":"string","enum":["owner","shared","admin"]},"authorName":{"nullable":true,"type":"string"}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels","createdBy","teams","users","viewerRole","authorName"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/disable":{"post":{"operationId":"disableApp","tags":["Apps"],"description":"Disable an app, pulling it back to an author-only state.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"viewerRole":{"type":"string","enum":["owner","shared","admin"]},"authorName":{"nullable":true,"type":"string"}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels","createdBy","teams","users","viewerRole","authorName"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/lock":{"post":{"operationId":"lockApp","tags":["Apps"],"description":"Lock an app, refusing all chat-driven modification (and REST html replacement/deletion) until unlocked.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"viewerRole":{"type":"string","enum":["owner","shared","admin"]},"authorName":{"nullable":true,"type":"string"}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels","createdBy","teams","users","viewerRole","authorName"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/unlock":{"post":{"operationId":"unlockApp","tags":["Apps"],"description":"Unlock a locked app, making it editable again.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"viewerRole":{"type":"string","enum":["owner","shared","admin"]},"authorName":{"nullable":true,"type":"string"}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels","createdBy","teams","users","viewerRole","authorName"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/versions":{"get":{"operationId":"getAppVersions","tags":["Apps"],"description":"List an app's versions, newest first.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"html":{"type":"string"},"uiPermissions":{"nullable":true,"type":"object","properties":{"camera":{"type":"object","properties":{},"additionalProperties":false},"microphone":{"type":"object","properties":{},"additionalProperties":false},"geolocation":{"type":"object","properties":{},"additionalProperties":false},"clipboardWrite":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false},"contentHash":{"type":"string"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","appId","version","html","uiPermissions","contentHash","spec","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/versions/summaries":{"get":{"operationId":"getAppVersionSummaries","tags":["Apps"],"description":"List an app's version metadata without returning the HTML artifacts.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdAt":{"type":"string","format":"date-time"}},"required":["id","appId","version","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/versions/{version}":{"get":{"operationId":"getAppVersion","tags":["Apps"],"description":"Get a specific app version.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"html":{"type":"string"},"uiPermissions":{"nullable":true,"type":"object","properties":{"camera":{"type":"object","properties":{},"additionalProperties":false},"microphone":{"type":"object","properties":{},"additionalProperties":false},"geolocation":{"type":"object","properties":{},"additionalProperties":false},"clipboardWrite":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false},"contentHash":{"type":"string"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","appId","version","html","uiPermissions","contentHash","spec","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/versions/{version}/restore":{"post":{"operationId":"restoreAppVersion","tags":["Apps"],"description":"Restore an immutable app version by copying its artifact forward as a new head version. History is never rewritten.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"baseVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["baseVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"authorId":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"nullable":true,"type":"string"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spec":{"nullable":true,"type":"object","properties":{"summary":{"type":"string","description":"One-line summary of what the app is for."},"features":{"type":"array","items":{"type":"string"},"description":"Concrete capabilities the app should provide."},"data":{"description":"What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.","nullable":true,"type":"string"},"ui":{"description":"UI / style direction as a free-form prose string, not a structured object.","nullable":true,"type":"string"},"tools":{"type":"array","items":{"type":"string"},"description":"Full names of the MCP tools the app calls through window.archestra."}},"required":["summary","features","tools"],"additionalProperties":false},"latestVersion":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"openInFullscreen":{"type":"boolean"},"locked":{"type":"boolean"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"scope":{"type":"string","enum":["personal","team","org"]},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"nullable":true,"type":"string"},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","organizationId","authorId","name","slug","description","templateId","mcpServerId","spec","latestVersion","enabled","openInFullscreen","locked","createdByServiceAccountId","createdAt","updatedAt","deletedAt","scope","environmentId","icon","labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/tools":{"get":{"operationId":"getAppTools","tags":["Apps"],"description":"List the tools assigned to an app, including each assignment's stored server pin and credential resolution mode.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"agentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"delegateToAgentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"delegateToA2aConnectionId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"rawName":{"nullable":true,"type":"string"},"parameters":{"anyOf":[{"description":"\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ","type":"object","additionalProperties":{}}]},"description":{"nullable":true,"type":"string"},"meta":{"nullable":true,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"clonedPendingDiscovery":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"credentialResolutionMode":{"type":"string","enum":["static","dynamic","enterprise_managed"]}},"required":["id","agentId","catalogId","delegateToAgentId","delegateToA2aConnectionId","name","rawName","description","meta","clonedPendingDiscovery","createdAt","updatedAt","deletedAt","mcpServerId","credentialResolutionMode"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/diagnostics":{"post":{"operationId":"postAppRenderDiagnostics","tags":["Apps"],"description":"Record the calling user's latest render diagnostics for an app. An empty entries array means the render was clean.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"entries":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","maxLength":32},"message":{"type":"string","maxLength":1000}},"required":["type","message"]}}},"required":["version","entries"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/screenshot":{"post":{"operationId":"postAppRenderScreenshot","tags":["Apps"],"description":"Record the calling user's latest render screenshot for an app (a base64 image data URL the app self-captured).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"dataUrl":{"type":"string","maxLength":2000000,"pattern":"^data:image\\/(png|jpeg|webp);base64,"}},"required":["version","dataUrl"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/apps/{appId}/tools/{toolId}":{"post":{"operationId":"assignToolToApp","tags":["Apps"],"description":"Assign an upstream tool to an app.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mcpServerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"credentialResolutionMode":{"type":"string","enum":["static","dynamic","enterprise_managed"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"toolId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"unassignToolFromApp","tags":["Apps"],"description":"Unassign a tool from an app.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"appId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"toolId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/client-connections/installer":{"get":{"operationId":"getClientConnectionInstaller","tags":["Connection Setups"],"description":"Public, credential-free Node.js client connection installer.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","responses":{"200":{"description":"Default Response"}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/client-connections":{"post":{"operationId":"startClientConnection","tags":["Connection Setups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","enum":["claude-code","cursor","codex","chatgpt","claude-desktop","copilot-cli","opencode","kilo","pi","kimi-code"]},"platform":{"type":"string","enum":["macos","linux","windows"]},"exclude":{"maxItems":4,"type":"array","items":{"type":"string","enum":["tools","skills","proxy","plugins"]}},"gateway":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"plugins":{"maxItems":555,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,128}$"}},"deviceName":{"type":"string","minLength":1,"maxLength":64}},"required":["clientId","platform"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deviceCode":{"type":"string"},"userCode":{"type":"string"},"verificationPath":{"type":"string"},"expiresAt":{"type":"string"},"interval":{"type":"number"}},"required":["id","deviceCode","userCode","verificationPath","expiresAt","interval"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]},"description":"Authentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)"}},"/api/client-connections/poll":{"post":{"operationId":"pollClientConnection","tags":["Connection Setups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","denied","expired"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]},"description":"Authentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)"}},"/api/client-connections/{id}":{"get":{"operationId":"getClientConnection","tags":["Connection Setups"],"parameters":[{"schema":{"type":"string","pattern":"^[a-f0-9]{48}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","enum":["claude-code","cursor","codex","chatgpt","claude-desktop","copilot-cli","opencode","kilo","pi","kimi-code"]},"platform":{"type":"string","enum":["macos","linux","windows"]},"exclude":{"type":"array","items":{"type":"string","enum":["tools","skills","proxy","plugins"]}},"gateway":{"nullable":true,"type":"string"},"plugins":{"nullable":true,"type":"array","items":{"type":"string"}},"deviceName":{"nullable":true,"type":"string"},"userCode":{"type":"string"},"expiresAt":{"type":"string"}},"required":["clientId","platform","exclude","gateway","plugins","deviceName","userCode","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]},"description":"Authentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)"}},"/api/client-connections/{id}/decision":{"post":{"operationId":"decideClientConnection","tags":["Connection Setups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"decision":{"type":"string","enum":["approve"]},"setupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["decision","setupId"]},{"type":"object","properties":{"decision":{"type":"string","enum":["deny"]}},"required":["decision"]}]}}}},"parameters":[{"schema":{"type":"string","pattern":"^[a-f0-9]{48}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["approved","denied"]},"clientId":{"type":"string","enum":["claude-code","cursor","codex","chatgpt","claude-desktop","copilot-cli","opencode","kilo","pi","kimi-code"]},"platform":{"type":"string","enum":["macos","linux","windows"]}},"required":["status","clientId","platform"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]},"description":"Authentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)"}},"/api/connected-clients":{"get":{"operationId":"getConnectedClients","tags":["Connection Setups"],"description":"List the coding clients the signed-in user connected through the Connect page, from their redeemed setup tickets and, for clients the gateway can tell apart, their gateway sign-in.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":2048},"name":{"type":"string"},"lastConnectedAt":{"type":"string","format":"date-time"},"deviceNames":{"type":"array","items":{"type":"string"}},"lastSeenAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["clientId","name","lastConnectedAt","deviceNames","lastSeenAt"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/connected-clients/log":{"get":{"operationId":"getConnectedClientLog","tags":["Connection Setups"],"description":"Log of the organization's agent connections, newest first: an event each time a member connected a coding client through the Connect page, with the machine and what the setup included, each time one was disconnected, and each agent's first OAuth sign-in to the gateway under the name it registered.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`log:admin`](/docs/reference/permissions#log:admin): View every LLM, MCP, and Guardrails consult log in your organization (also requires Read)\n[`member:read`](/docs/reference/permissions#member:read): View organization members and their roles","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"userId","required":false,"description":"Only events for this user's clients"},{"schema":{"type":"string","enum":["connected","disconnected"]},"in":"query","name":"action","required":false,"description":"Only connects or only disconnects"},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"startDate","required":false,"description":"Events on or after this date (ISO 8601)"},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"endDate","required":false,"description":"Events on or before this date (ISO 8601)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string","enum":["connected","disconnected"]},"occurredAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"userName":{"type":"string"},"userEmail":{"type":"string"},"clientId":{"nullable":true,"type":"string"},"agentName":{"type":"string"},"via":{"type":"string","enum":["setup","oauthSignIn"]},"platform":{"anyOf":[{"type":"string","enum":["macos","linux","windows"]},{"type":"string","nullable":true,"enum":[null]}]},"deviceName":{"nullable":true,"type":"string"},"mcpGateway":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"llmProxy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"includeSkills":{"type":"boolean"},"skillCount":{"type":"number"},"disconnectedBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","action","occurredAt","userId","userName","userEmail","clientId","agentName","via","platform","deviceName","mcpGateway","llmProxy","includeSkills","skillCount","disconnectedBy"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"nextCursor":{"nullable":true,"type":"string"},"hasNext":{"type":"boolean"}},"required":["limit","nextCursor","hasNext"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["log:admin","member:read"]}}},"/api/connected-clients/adoption":{"get":{"operationId":"getAgentAdoption","tags":["Connection Setups"],"description":"Every organization member with their agents (set up through the Connect page, signed in to the gateway, or seen calling it or the LLM proxy) and the last MCP gateway and LLM proxy use seen from them. A member is active when their agents made gateway or LLM proxy calls in the window (the last 30 days unless picked); setups and sign-ins alone only show the installer ran.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`log:admin`](/docs/reference/permissions#log:admin): View every LLM, MCP, and Guardrails consult log in your organization (also requires Read)\n[`member:read`](/docs/reference/permissions#member:read): View organization members and their roles","parameters":[{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"startDate","required":false,"description":"Traffic on or after this date (ISO 8601); the last 30 days when left out"},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"endDate","required":false,"description":"Traffic on or before this date (ISO 8601); now when left out"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["active","inactive","notConnected"]},"gatewayLastSeenAt":{"nullable":true,"type":"string","format":"date-time"},"llmLastSeenAt":{"nullable":true,"type":"string","format":"date-time"},"agents":{"type":"array","items":{"type":"object","properties":{"clientId":{"nullable":true,"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","inactive","notConnected"]},"setupAt":{"nullable":true,"type":"string","format":"date-time"},"signedIn":{"type":"boolean"},"viaToken":{"type":"boolean"},"lastGatewayCallAt":{"nullable":true,"type":"string","format":"date-time"},"lastLlmCallAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["clientId","name","status","setupAt","signedIn","viaToken","lastGatewayCallAt","lastLlmCallAt"],"additionalProperties":false}},"gatewayUses":{"type":"array","items":{"type":"object","properties":{"via":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"agent":{"type":"object","properties":{"clientId":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["clientId","name"],"additionalProperties":false},"calls":{"type":"number"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["via","agent","calls","lastSeenAt"],"additionalProperties":false}},"llmUses":{"type":"array","items":{"type":"object","properties":{"via":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"agent":{"type":"object","properties":{"clientId":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["clientId","name"],"additionalProperties":false},"calls":{"type":"number"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["via","agent","calls","lastSeenAt"],"additionalProperties":false}}},"required":["userId","name","email","status","gatewayLastSeenAt","llmLastSeenAt","agents","gatewayUses","llmUses"],"additionalProperties":false}}},"required":["since","until","members"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["log:admin","member:read"]}}},"/api/connected-clients/adoption/usage":{"get":{"operationId":"getAgentAdoptionUsage","tags":["Connection Setups"],"description":"MCP gateway and LLM proxy calls from members' agents per UTC day over the window (the last 30 days unless picked), for one member or the whole organization. Counts the same traffic as the adoption summary.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`log:admin`](/docs/reference/permissions#log:admin): View every LLM, MCP, and Guardrails consult log in your organization (also requires Read)\n[`member:read`](/docs/reference/permissions#member:read): View organization members and their roles","parameters":[{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"startDate","required":false,"description":"Traffic on or after this date (ISO 8601); the last 30 days when left out"},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"endDate","required":false,"description":"Traffic on or before this date (ISO 8601); now when left out"},{"schema":{"type":"string"},"in":"query","name":"userId","required":false,"description":"Only this member's calls; the whole organization when left out"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"gatewayCalls":{"type":"number"},"llmCalls":{"type":"number"}},"required":["date","gatewayCalls","llmCalls"],"additionalProperties":false}}},"required":["since","until","days"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["log:admin","member:read"]}}},"/api/connected-clients/{clientId}":{"delete":{"operationId":"disconnectConnectedClient","tags":["Connection Setups"],"description":"Disconnect one of the signed-in user's coding clients: it leaves the connected list and the skill share links its setups created are revoked. Where the gateway can tell the client apart by its OAuth client (Claude Code, Amp), the user's tokens and consent for it are deleted too; other clients keep their gateway sign-in until it expires. Local client configuration is removed separately by /disconnect.md.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":2048},"in":"path","name":"clientId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/connection-setups/startup-guard":{"post":{"operationId":"renderStartupGuard","tags":["Connection Setups"],"description":"Render a credential-free startup check without replaying connection setup.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","enum":["claude-code","codex","copilot-cli","opencode","kilo","kimi-code"]},"platform":{"type":"string","enum":["bash","windows"]},"context":{"type":"object","properties":{"appName":{"type":"string","maxLength":512},"healthUrl":{"nullable":true,"type":"string","maxLength":2048,"format":"uri"},"mcp":{"nullable":true,"type":"object","properties":{"serverName":{"type":"string","maxLength":512},"url":{"type":"string","maxLength":2048,"format":"uri"},"ref":{"nullable":true,"type":"string","maxLength":512}},"required":["serverName","url","ref"],"additionalProperties":false},"proxy":{"nullable":true,"type":"object","properties":{"provider":{"type":"string","enum":["openai","gemini","anthropic","bedrock","cohere","cerebras","mistral","perplexity","groq","xai","openrouter","vllm","ollama","ollama-native","zhipuai","deepseek","minimax","kimi","kimi-code","azure","github-copilot","microsoft-365-copilot","archestra","voyage","jev"]},"providerLabel":{"type":"string","maxLength":512},"url":{"type":"string","maxLength":2048,"format":"uri"},"ref":{"nullable":true,"type":"string","maxLength":512},"proxyName":{"type":"string","maxLength":512},"authMode":{"type":"string","enum":["provider-key","virtual-key","primary-providers"]},"usesModelCatalog":{"type":"boolean"},"passthroughVirtualKey":{"nullable":true,"type":"string","enum":["ARCH_GUARD_PRIVATE_KEY"]}},"required":["provider","providerLabel","url","ref","proxyName"],"additionalProperties":false},"skills":{"nullable":true,"type":"object","properties":{"marketplaceName":{"type":"string","maxLength":512},"cloneUrl":{"type":"string","enum":["ARCH_GUARD_PRIVATE_CLONE_URL"]},"hasSkills":{"type":"boolean"},"connectionPlugin":{"type":"boolean"},"pluginNames":{"maxItems":555,"type":"array","items":{"type":"string","maxLength":512}}},"required":["marketplaceName","cloneUrl"],"additionalProperties":false}},"required":["appName","healthUrl","mcp","proxy","skills"],"additionalProperties":false}},"required":["clientId","platform","context"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"number","enum":[1]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"clientId":{"type":"string","enum":["claude-code","codex","copilot-cli","opencode","kilo","kimi-code"]},"platform":{"type":"string","enum":["bash","windows"]},"source":{"type":"string"},"sha256":{"type":"string"}},"required":["format","version","clientId","platform","source","sha256"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/connection-setups/runtime":{"get":{"operationId":"getConnectionRuntime","tags":["Connection Setups"],"description":"Read executable managed launcher/plugin artifacts using a distinct installation update capability. Consumed connection, revocation, live membership and resource access are rechecked. Does not replay installation or issue credentials.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"number","enum":[1]},"installation":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientId":{"type":"string","enum":["opencode","kilo"]},"artifacts":{"type":"object","additionalProperties":{"type":"object","properties":{"source":{"type":"string"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source","sha256"],"additionalProperties":false}}},"required":["format","installation","clientId","artifacts"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/v1/connection-instructions":{"get":{"operationId":"getConnectionInstructions","tags":["Connection Setups"],"description":"Read current managed instructions with an installation-scoped read-only credential. Live membership and gateway access are rechecked.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"nullable":true,"type":"string","maxLength":20000},"version":{"type":"string"}},"required":["instructions","version"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/health":{"get":{"operationId":"getConnectionHealth","tags":["Connection Setups"],"description":"Health of the remotes a connected client is wired to, one request for all of them. Public: used by the Claude Code startup guard before every launch, from machines with no session. Reports only ok/down per requested remote, the launch check's format version, and the gateway's tool prefix.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"mcp","required":false},{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"llm","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"mcp":{"type":"string","enum":["ok","down"]},"llm":{"type":"string","enum":["ok","down"]},"guardVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"mcpToolPrefix":{"type":"string"}},"required":["guardVersion","mcpToolPrefix"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/connection-setups":{"post":{"operationId":"createConnectionSetup","tags":["Connection Setups"],"description":"Persist /connection wizard selections and return a one-time `curl | bash` command. The command's setup token is shown exactly once and expires after 15 minutes.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","enum":["claude-code","cursor","codex","chatgpt","claude-desktop","copilot-cli","opencode","kilo","pi","kimi-code"]},"platform":{"default":"macos","type":"string","enum":["macos","linux","windows"]},"baseUrl":{"type":"string","maxLength":2048,"format":"uri"},"mcpGatewayId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"llmProxyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["openai","gemini","anthropic","bedrock","cohere","cerebras","mistral","perplexity","groq","xai","openrouter","vllm","ollama","ollama-native","zhipuai","deepseek","minimax","kimi","kimi-code","azure","github-copilot","microsoft-365-copilot","archestra","voyage","jev"]},"proxyAuth":{"default":"provider-key","type":"string","enum":["provider-key","virtual-key","primary-providers"]},"attributePassthrough":{"default":true,"type":"boolean"},"providerApiKeyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"model":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x20-\\x7E]+$"},"skills":{"type":"object","properties":{"skillIds":{"minItems":1,"maxItems":1111,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"ttlDays":{"nullable":true,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":3650}},"required":["skillIds","ttlDays"]},"pluginIds":{"maxItems":555,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["clientId","baseUrl"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"command":{"type":"string"},"installerUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"tokenStart":{"type":"string"},"creditWarning":{"type":"object","properties":{"kind":{"type":"string","enum":["insufficient_balance","unverified"]},"keyName":{"type":"string"}},"required":["kind","keyName"],"additionalProperties":false},"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"pluginSlug":{"type":"string"},"displayName":{"type":"string"},"clientType":{"type":"string","enum":["claude-code","cursor","codex","chatgpt","claude-desktop","copilot-cli","opencode","kilo","pi","kimi-code"]}},"required":["id","pluginSlug","displayName","clientType"],"additionalProperties":false}}},"required":["id","command","expiresAt","tokenStart","plugins"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/connection-setups/virtual-key":{"post":{"operationId":"createConnectionVirtualKey","tags":["Connection Setups"],"description":"Provision (or reuse) the caller's personal connection virtual key for a provider and return its value once. Backs the manual /connection flow's virtual-key option; mirrors the auto-provisioning done by the one-command setup. Requires llmVirtualKey:create.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","gemini","anthropic","bedrock","cohere","cerebras","mistral","perplexity","groq","xai","openrouter","vllm","ollama","ollama-native","zhipuai","deepseek","minimax","kimi","kimi-code","azure","github-copilot","microsoft-365-copilot","archestra","voyage","jev"]}},"required":["provider"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"},"creditWarning":{"type":"object","properties":{"kind":{"type":"string","enum":["insufficient_balance","unverified"]},"keyName":{"type":"string"}},"required":["kind","keyName"],"additionalProperties":false}},"required":["value","name"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/connection-setups/passthrough-key":{"post":{"operationId":"createConnectionPassthroughKey","tags":["Connection Setups"],"description":"Provision (or reuse) the caller's personal passthrough virtual key scoped to an LLM proxy and return its value once. Backs the manual /connection flow's X-Archestra-Virtual-Key attribution step for Claude Code and Claude Desktop. Requires llmVirtualKey:create.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"llmProxyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["llmProxyId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"}},"required":["value","name"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/connection-setups/script/{token}":{"get":{"operationId":"getConnectionSetupScript","tags":["Connection Setups"],"description":"Serve the rendered one-time setup script for a connection setup. Authenticates via the one-time token in the path; the token is consumed atomically on the first successful render.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","enum":["desktop"]},"in":"query","name":"download","required":false},{"schema":{"type":"string","minLength":20,"maxLength":256},"in":"path","name":"token","required":true}],"responses":{"200":{"description":"Default Response"}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/git-credentials":{"get":{"operationId":"listGitCredentials","tags":["Git Credentials"],"description":"List the organization's GitHub Apps and GitLab access tokens. Token values are never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:read`](/docs/reference/permissions#credential:read): Open Credentials","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab"]},"kind":{"type":"string","enum":["github_app","gitlab_token"]},"webUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","provider","kind","webUrl","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:read"]}}},"/api/git-credentials/gitlab":{"post":{"operationId":"createGitlabToken","tags":["Git Credentials"],"description":"Save a GitLab access token after GitLab confirms it can read the API. The token is stored as a secret and never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:create`](/docs/reference/permissions#credential:create): Create saved credentials","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"gitlabUrl":{"default":"https://gitlab.com","description":"GitLab web address, e.g. https://gitlab.com","type":"string"},"token":{"type":"string","minLength":1,"description":"A project, group, or personal access token. Write-only: never returned."}},"required":["name","token"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab"]},"kind":{"type":"string","enum":["github_app","gitlab_token"]},"webUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","provider","kind","webUrl","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:create"]}}},"/api/git-credentials/{id}/repositories":{"get":{"operationId":"listGitCredentialRepositories","tags":["Git Credentials"],"description":"Repositories a Git credential can reach: the GitHub App's installed repositories, or the GitLab projects the token is a member of.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:read`](/docs/reference/permissions#credential:read): Open Credentials","parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"private":{"type":"boolean"},"defaultBranch":{"nullable":true,"type":"string"}},"required":["path","private","defaultBranch"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:read"]}}},"/api/git-credentials/{id}/namespaces":{"get":{"operationId":"listGitCredentialNamespaces","tags":["Git Credentials"],"description":"Where a Git credential can create repositories: the GitHub App's account, or the GitLab groups the token can create projects in. An empty string is the GitLab token owner's own namespace.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:read`](/docs/reference/permissions#credential:read): Open Credentials","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:read"]}}},"/api/github-app-configs":{"get":{"operationId":"listGithubAppConfigs","tags":["GitHub App Configs"],"description":"List organization GitHub App configurations. The private key is never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:read`](/docs/reference/permissions#credential:read): Open Credentials","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"githubUrl":{"type":"string"},"appId":{"type":"string"},"installationId":{"type":"string"}},"required":["id","organizationId","name","createdAt","updatedAt","githubUrl","appId","installationId"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:read"]}},"post":{"operationId":"createGithubAppConfig","tags":["GitHub App Configs"],"description":"Create a GitHub App configuration. The private key is stored as a secret and never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:create`](/docs/reference/permissions#credential:create): Create saved credentials","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"githubUrl":{"type":"string","format":"uri"},"appId":{"type":"string","minLength":1},"installationId":{"type":"string","minLength":1},"privateKey":{"type":"string","minLength":1,"description":"GitHub App private key PEM"}},"required":["name","appId","installationId","privateKey"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"githubUrl":{"type":"string"},"appId":{"type":"string"},"installationId":{"type":"string"}},"required":["id","organizationId","name","createdAt","updatedAt","githubUrl","appId","installationId"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:create"]}}},"/api/github-app-configs/{id}":{"get":{"operationId":"getGithubAppConfig","tags":["GitHub App Configs"],"description":"Get a GitHub App configuration. The private key is never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"githubUrl":{"type":"string"},"appId":{"type":"string"},"installationId":{"type":"string"}},"required":["id","organizationId","name","createdAt","updatedAt","githubUrl","appId","installationId"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"put":{"operationId":"updateGithubAppConfig","tags":["GitHub App Configs"],"description":"Update a GitHub App configuration. Provide a private key only to rotate it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"githubUrl":{"type":"string","format":"uri"},"appId":{"type":"string","minLength":1},"installationId":{"type":"string","minLength":1},"privateKey":{"type":"string","minLength":1,"description":"GitHub App private key PEM"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"githubUrl":{"type":"string"},"appId":{"type":"string"},"installationId":{"type":"string"}},"required":["id","organizationId","name","createdAt","updatedAt","githubUrl","appId","installationId"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"deleteGithubAppConfig","tags":["GitHub App Configs"],"description":"Delete a GitHub App configuration and its stored private key.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/github-pats":{"get":{"operationId":"listGithubPats","tags":["GitHub PATs"],"description":"List organization GitHub personal access tokens. The token value is never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:read`](/docs/reference/permissions#credential:read): Open Credentials","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","name","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:read"]}},"post":{"operationId":"createGithubPat","tags":["GitHub PATs"],"description":"Store a GitHub personal access token. The token is stored as a secret and never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:create`](/docs/reference/permissions#credential:create): Create saved credentials","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"token":{"type":"string","minLength":1,"description":"GitHub personal access token"}},"required":["name","token"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:create"]}}},"/api/github-pats/{id}":{"put":{"operationId":"updateGithubPat","tags":["GitHub PATs"],"description":"Rename a stored GitHub token. Provide a token only to rotate it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"token":{"description":"Provide only to rotate the stored token.","type":"string","minLength":1}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"deleteGithubPat","tags":["GitHub PATs"],"description":"Delete a stored GitHub token and its secret. Rejected while synced skills authenticate with it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/connectors":{"get":{"operationId":"getConnectors","tags":["Connectors"],"description":"List all connectors for the organization. `status=deleted` lists the soft-deleted ones instead — the trash view, which requires [`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete). Search and connector-type filtering behave identically on both slices; `knowledgeBaseId` is an active-only filter and is rejected with a 400 alongside `status=deleted`. The deleted slice carries identity only: `assignedAgents` comes back empty, since those links resolve to nothing while the connector is in the trash, and `totalDocsIngested` is not counted and comes back 0. It is also the one slice that never hides a row whose stored `config` no longer matches a known connector shape — the trash is the only place restore and permanent delete are offered.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"knowledgeBaseId","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]},{"type":"string","enum":["file_upload"]}]},"in":"query","name":"connectorType","required":false},{"schema":{"default":"active","type":"string","enum":["active","deleted"]},"in":"query","name":"status","required":false,"description":"Filter by lifecycle status. `deleted` lists soft-deleted connectors and requires [`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete)."},{"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["mine","shared","org","others"]}},"in":"query","name":"access","required":false,"description":"Keep only objects the caller reaches in one of these ways (comma-separated): mine (authored by the caller), shared (shared with the caller or one of their teams), org (shared with the organization), others (visible only through organization-wide authority). Omit for every readable object."},{"schema":{"minItems":1,"type":"array","items":{"type":"string"}},"in":"query","name":"sharedWith","required":false,"description":"Keep only objects whose own permissions grant read to one of these subjects (comma-separated): org (the whole organization), role:<roleId>, team:<teamId>, user:<userId>, serviceAccount:<serviceAccountId>. Grants inherited from organization-wide permissions do not count. Omit for no filtering."},{"schema":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"in":"query","name":"owner","required":false,"description":"Keep only objects authored by one of these user IDs (comma-separated). Narrows the rows the caller can already read. Omit for no filtering."},{"schema":{"maxItems":250,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"in":"query","name":"ids","required":false,"description":"Only these connectors (comma-separated IDs, at most 250), such as the ones a page shows or an agent uses. All of them come back in one page; `limit` and `offset` do not apply."},{"schema":{"type":"boolean"},"in":"query","name":"includeAssignedAgents","required":false,"description":"Attach each row's assigned agents (default true). False returns an empty `assignedAgents` array, meaning 'not requested'; `assignedAgentCount` is returned either way."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"visibility":{"type":"string","enum":["org-wide","team-scoped","auto-sync-permissions"]},"teamIds":{"type":"array","items":{"type":"string"}},"syncPermissionsFromSource":{"type":"boolean"},"connectorType":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]},{"type":"string","enum":["file_upload"]}]},"config":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["jira"]},"jiraBaseUrl":{},"isCloud":{"type":"boolean"},"projectKey":{"type":"string"},"jqlQuery":{"type":"string"},"commentEmailBlacklist":{"type":"array","items":{"type":"string"}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","jiraBaseUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["confluence"]},"confluenceUrl":{},"isCloud":{"type":"boolean"},"spaceKeys":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"cqlQuery":{"type":"string"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","confluenceUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"githubUrl":{},"owner":{"type":"string"},"authMethod":{"type":"string","enum":["pat","github_app","credential"]},"credentialId":{"type":"string","minLength":1,"maxLength":128},"githubAppConfigId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","enum":[""]}]},"repos":{"type":"array","items":{"type":"string"}},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"repositoryOverrides":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[^/\\\\\\s]+\\/[^/\\\\\\s]+$"},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}}},"required":["repository"],"additionalProperties":false}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","githubUrl","owner"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gitlab"]},"gitlabUrl":{},"projectIds":{"type":"array","items":{"type":"number"}},"groupId":{"type":"string"},"includeIssues":{"type":"boolean"},"includeMergeRequests":{"type":"boolean"},"includeMarkdownFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","gitlabUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["servicenow"]},"instanceUrl":{},"includeIncidents":{"type":"boolean"},"includeChanges":{"type":"boolean"},"includeChangeRequests":{"type":"boolean"},"includeProblems":{"type":"boolean"},"includeBusinessApps":{"type":"boolean"},"includeKnowledgeArticles":{"type":"boolean"},"states":{"type":"array","items":{"type":"string"}},"assignmentGroups":{"type":"array","items":{"type":"string"}},"roleAudiences":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"batchSize":{"type":"number"},"syncDataForLastMonths":{"type":"number","minimum":1,"maximum":12}},"required":["type","instanceUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["notion"]},"databaseIds":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["sharepoint"]},"tenantId":{"type":"string","minLength":1},"siteUrl":{},"driveIds":{"type":"array","items":{"type":"string"}},"folderPath":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"includePages":{"type":"boolean"},"pagePublicationStatus":{"description":"Site pages to sync by current publication status. Omitted means both for compatibility.","type":"string","enum":["published","draft","both"]},"batchSize":{"type":"number"}},"required":["type","tenantId","siteUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gdrive"]},"authMode":{"type":"string","enum":["service_account","service_account_delegated","oauth"]},"delegatedAdminEmail":{"type":"string"},"connectedAccountEmail":{"type":"string"},"driveId":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["dropbox"]},"rootPath":{"type":"string"},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"},"recursive":{"type":"boolean"},"maxDepth":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["onedrive"]},"tenantId":{"type":"string","minLength":1},"userIds":{"minItems":1,"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","tenantId","userIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["asana"]},"workspaceGid":{"type":"string","minLength":1},"projectGids":{"type":"array","items":{"type":"string"}},"tagsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","workspaceGid"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"linearApiUrl":{"default":"https://api.linear.app"},"teamIds":{"type":"array","items":{"type":"string"}},"projectIds":{"type":"array","items":{"type":"string"}},"states":{"type":"array","items":{"type":"string"}},"includeComments":{"type":"boolean"},"includeProjects":{"type":"boolean"},"includeCycles":{"type":"boolean"},"batchSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","linearApiUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["outline"]},"outlineUrl":{},"collectionIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","outlineUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["salesforce"]},"authMethod":{"type":"string","enum":["oauth_client_credentials","soap_legacy"]},"clientId":{"type":"string","minLength":1},"loginUrl":{"default":"https://login.salesforce.com"},"objects":{"type":"array","items":{"type":"string","minLength":1}},"advancedObjectConfigJson":{"type":"string"}},"required":["type","loginUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_crawler"]},"startUrl":{},"renderJavaScript":{"type":"boolean"},"renderWaitMs":{"type":"integer","minimum":0,"maximum":10000},"additionalStartUrls":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"allowedOrigins":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"includePathPrefixes":{"type":"array","items":{"type":"string","minLength":1}},"excludePathPatterns":{"type":"array","items":{"type":"string","minLength":1}},"contentSelector":{"type":"string","minLength":1,"maxLength":500},"excludeSelectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"maxPages":{"type":"integer","minimum":1,"maximum":10000},"maxDepth":{"type":"integer","minimum":0,"maximum":50},"batchSize":{"type":"integer","minimum":1,"maximum":100},"requestDelayMs":{"type":"integer","minimum":0,"maximum":10000},"userAgent":{"type":"string","minLength":1},"allowPrivateNetwork":{"type":"boolean"}},"required":["type","startUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["perforce"]},"serverUrl":{},"depotPaths":{"minItems":1,"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string","pattern":"^\\.?[A-Za-z0-9_-]+$"}},"p4Port":{"type":"string","pattern":"^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"},"adminUsername":{"type":"string","minLength":1,"maxLength":256}},"required":["type","serverUrl","depotPaths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["mfiles"]},"baseUrl":{},"vaultGuid":{"type":"string","pattern":"^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"},"authMethod":{"type":"string","enum":["oauth_client_credentials","mfiles_password_token"]},"oauthTokenEndpoint":{},"oauthScope":{"type":"string","minLength":1},"oauthResource":{"type":"string","minLength":1},"oauthAuthConfig":{"type":"string","minLength":1},"oauthAuthConfigScope":{"type":"string","minLength":1},"oauthAccountName":{"type":"string","minLength":1},"oauthUseIdToken":{"type":"boolean"},"oauthClientAuthMethod":{"type":"string","enum":["client_secret_post","client_secret_basic"]},"domain":{"type":"string"},"objectTypeIds":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"batchSize":{"type":"integer","minimum":1,"maximum":500},"permissionExtensionMethod":{"type":"string","minLength":1}},"required":["type","baseUrl","vaultGuid"],"additionalProperties":false}]},{"type":"object","additionalProperties":{}}]},"secretId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schedule":{"type":"string"},"ftsLanguage":{"$ref":"#/components/schemas/TextSearchLanguage"},"permissionSyncIntervalSeconds":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"lastSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"lastSyncError":{"nullable":true,"type":"string"},"lastPermissionSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastPermissionSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"checkpoint":{"nullable":true,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"aclConfigEpoch":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"assignedAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"agentType":{"type":"string"}},"required":["id","name","agentType"],"additionalProperties":false}},"assignedAgentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalDocsIngested":{"type":"number"}},"required":["id","organizationId","name","description","visibility","teamIds","syncPermissionsFromSource","connectorType","config","secretId","environmentId","schedule","ftsLanguage","permissionSyncIntervalSeconds","enabled","lastSyncAt","lastSyncStatus","lastSyncError","lastPermissionSyncAt","lastPermissionSyncStatus","checkpoint","aclConfigEpoch","createdByServiceAccountId","createdAt","updatedAt","deletedAt","createdBy","labels","assignedAgents","assignedAgentCount","totalDocsIngested"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"currentPage":{"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}},"required":["currentPage","limit","total","totalPages","hasNext","hasPrev"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}},"post":{"operationId":"createConnector","tags":["Connectors"],"description":"Create a new connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:create`](/docs/reference/permissions#knowledgeSource:create): Create Knowledge Bases and Connectors","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"syncPermissionsFromSource":{"description":"Mirror each document's access control from the source, so a query only returns what the caller could open there. Needs an enterprise license and a connector type that supports it.","type":"boolean"},"connectorType":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]}]},"config":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["jira"]},"jiraBaseUrl":{"type":"string"},"isCloud":{"type":"boolean"},"projectKey":{"type":"string"},"jqlQuery":{"type":"string"},"commentEmailBlacklist":{"type":"array","items":{"type":"string"}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","jiraBaseUrl","isCloud"]},{"type":"object","properties":{"type":{"type":"string","enum":["confluence"]},"confluenceUrl":{"type":"string"},"isCloud":{"type":"boolean"},"spaceKeys":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"cqlQuery":{"type":"string"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","confluenceUrl","isCloud"]},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"githubUrl":{"type":"string"},"owner":{"type":"string"},"authMethod":{"type":"string","enum":["pat","github_app","credential"]},"credentialId":{"type":"string","minLength":1,"maxLength":128},"githubAppConfigId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","enum":[""]}]},"repos":{"type":"array","items":{"type":"string"}},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"repositoryOverrides":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[^/\\\\\\s]+\\/[^/\\\\\\s]+$"},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}}},"required":["repository"]}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","githubUrl","owner"]},{"type":"object","properties":{"type":{"type":"string","enum":["gitlab"]},"gitlabUrl":{"type":"string"},"projectIds":{"type":"array","items":{"type":"number"}},"groupId":{"type":"string"},"includeIssues":{"type":"boolean"},"includeMergeRequests":{"type":"boolean"},"includeMarkdownFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","gitlabUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["servicenow"]},"instanceUrl":{"type":"string"},"includeIncidents":{"type":"boolean"},"includeChanges":{"type":"boolean"},"includeChangeRequests":{"type":"boolean"},"includeProblems":{"type":"boolean"},"includeBusinessApps":{"type":"boolean"},"includeKnowledgeArticles":{"type":"boolean"},"states":{"type":"array","items":{"type":"string"}},"assignmentGroups":{"type":"array","items":{"type":"string"}},"roleAudiences":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"batchSize":{"type":"number"},"syncDataForLastMonths":{"type":"number","minimum":1,"maximum":12}},"required":["type","instanceUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["notion"]},"databaseIds":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["sharepoint"]},"tenantId":{"type":"string","minLength":1},"siteUrl":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderPath":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"includePages":{"type":"boolean"},"pagePublicationStatus":{"description":"Site pages to sync by current publication status. Omitted means both for compatibility.","type":"string","enum":["published","draft","both"]},"batchSize":{"type":"number"}},"required":["type","tenantId","siteUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["gdrive"]},"authMode":{"type":"string","enum":["service_account","service_account_delegated","oauth"]},"delegatedAdminEmail":{"type":"string"},"connectedAccountEmail":{"type":"string"},"driveId":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["dropbox"]},"rootPath":{"type":"string"},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"},"recursive":{"type":"boolean"},"maxDepth":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["onedrive"]},"tenantId":{"type":"string","minLength":1},"userIds":{"minItems":1,"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","tenantId","userIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["asana"]},"workspaceGid":{"type":"string","minLength":1},"projectGids":{"type":"array","items":{"type":"string"}},"tagsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","workspaceGid"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"linearApiUrl":{"type":"string"},"teamIds":{"type":"array","items":{"type":"string"}},"projectIds":{"type":"array","items":{"type":"string"}},"states":{"type":"array","items":{"type":"string"}},"includeComments":{"type":"boolean"},"includeProjects":{"type":"boolean"},"includeCycles":{"type":"boolean"},"batchSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["outline"]},"outlineUrl":{"type":"string"},"collectionIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","outlineUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["salesforce"]},"authMethod":{"type":"string","enum":["oauth_client_credentials","soap_legacy"]},"clientId":{"type":"string","minLength":1},"loginUrl":{"type":"string"},"objects":{"type":"array","items":{"type":"string","minLength":1}},"advancedObjectConfigJson":{"type":"string"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_crawler"]},"startUrl":{"type":"string"},"renderJavaScript":{"type":"boolean"},"renderWaitMs":{"type":"integer","minimum":0,"maximum":10000},"additionalStartUrls":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"allowedOrigins":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"includePathPrefixes":{"type":"array","items":{"type":"string","minLength":1}},"excludePathPatterns":{"type":"array","items":{"type":"string","minLength":1}},"contentSelector":{"type":"string","minLength":1,"maxLength":500},"excludeSelectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"maxPages":{"type":"integer","minimum":1,"maximum":10000},"maxDepth":{"type":"integer","minimum":0,"maximum":50},"batchSize":{"type":"integer","minimum":1,"maximum":100},"requestDelayMs":{"type":"integer","minimum":0,"maximum":10000},"userAgent":{"type":"string","minLength":1},"allowPrivateNetwork":{"type":"boolean"}},"required":["type","startUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["perforce"]},"serverUrl":{"type":"string"},"depotPaths":{"minItems":1,"type":"array","items":{"type":"string","maxLength":1024}},"excludePaths":{"type":"array","items":{"type":"string","maxLength":1024}},"fileTypes":{"type":"array","items":{"type":"string","pattern":"^\\.?[A-Za-z0-9_-]+$"}},"p4Port":{"type":"string","pattern":"^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"},"adminUsername":{"type":"string","minLength":1,"maxLength":256}},"required":["type","serverUrl","depotPaths"]},{"type":"object","properties":{"type":{"type":"string","enum":["mfiles"]},"baseUrl":{"type":"string"},"vaultGuid":{"type":"string","pattern":"^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"},"authMethod":{"type":"string","enum":["oauth_client_credentials","mfiles_password_token"]},"oauthTokenEndpoint":{"type":"string"},"oauthScope":{"type":"string","minLength":1},"oauthResource":{"type":"string","minLength":1},"oauthAuthConfig":{"type":"string","minLength":1},"oauthAuthConfigScope":{"type":"string","minLength":1},"oauthAccountName":{"type":"string","minLength":1},"oauthUseIdToken":{"type":"boolean"},"oauthClientAuthMethod":{"type":"string","enum":["client_secret_post","client_secret_basic"]},"domain":{"type":"string"},"objectTypeIds":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"batchSize":{"type":"integer","minimum":1,"maximum":500},"permissionExtensionMethod":{"type":"string","minLength":1}},"required":["type","baseUrl","vaultGuid"]}]},"credentials":{"type":"object","properties":{"email":{"type":"string"},"apiToken":{"type":"string"},"adminApiKey":{"type":"string"},"githubApp":{"type":"object","properties":{"githubUrl":{"type":"string"},"appId":{"type":"string"},"installationId":{"type":"string"}},"required":["githubUrl","appId","installationId"]},"googleOAuth":{"type":"object","properties":{"clientId":{"type":"string"},"clientSecret":{"type":"string"},"refreshToken":{"type":"string"}},"required":["clientId","clientSecret"]}},"required":["apiToken"]},"schedule":{"type":"string"},"ftsLanguage":{"allOf":[{"$ref":"#/components/schemas/TextSearchLanguageInput"}]},"permissionSyncIntervalSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"},"knowledgeBaseIds":{"type":"array","items":{"type":"string"}},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"labels":{"description":"Key/value labels. Omit to leave existing labels untouched; pass [] to clear them.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"]}},"initialGrants":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["team"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["serviceAccount"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["role"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["organization"]},"id":{"type":"string","enum":["*"]}},"required":["type","id"]}]},"actions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["read","use","update","delete","manage-permissions","configure-deployment-spec"]}}},"required":["subject","actions"]}}},"required":["name","connectorType","config"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"visibility":{"type":"string","enum":["org-wide","team-scoped","auto-sync-permissions"]},"teamIds":{"type":"array","items":{"type":"string"}},"syncPermissionsFromSource":{"type":"boolean"},"connectorType":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]},{"type":"string","enum":["file_upload"]}]},"config":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["jira"]},"jiraBaseUrl":{},"isCloud":{"type":"boolean"},"projectKey":{"type":"string"},"jqlQuery":{"type":"string"},"commentEmailBlacklist":{"type":"array","items":{"type":"string"}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","jiraBaseUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["confluence"]},"confluenceUrl":{},"isCloud":{"type":"boolean"},"spaceKeys":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"cqlQuery":{"type":"string"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","confluenceUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"githubUrl":{},"owner":{"type":"string"},"authMethod":{"type":"string","enum":["pat","github_app","credential"]},"credentialId":{"type":"string","minLength":1,"maxLength":128},"githubAppConfigId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","enum":[""]}]},"repos":{"type":"array","items":{"type":"string"}},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"repositoryOverrides":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[^/\\\\\\s]+\\/[^/\\\\\\s]+$"},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}}},"required":["repository"],"additionalProperties":false}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","githubUrl","owner"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gitlab"]},"gitlabUrl":{},"projectIds":{"type":"array","items":{"type":"number"}},"groupId":{"type":"string"},"includeIssues":{"type":"boolean"},"includeMergeRequests":{"type":"boolean"},"includeMarkdownFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","gitlabUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["servicenow"]},"instanceUrl":{},"includeIncidents":{"type":"boolean"},"includeChanges":{"type":"boolean"},"includeChangeRequests":{"type":"boolean"},"includeProblems":{"type":"boolean"},"includeBusinessApps":{"type":"boolean"},"includeKnowledgeArticles":{"type":"boolean"},"states":{"type":"array","items":{"type":"string"}},"assignmentGroups":{"type":"array","items":{"type":"string"}},"roleAudiences":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"batchSize":{"type":"number"},"syncDataForLastMonths":{"type":"number","minimum":1,"maximum":12}},"required":["type","instanceUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["notion"]},"databaseIds":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["sharepoint"]},"tenantId":{"type":"string","minLength":1},"siteUrl":{},"driveIds":{"type":"array","items":{"type":"string"}},"folderPath":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"includePages":{"type":"boolean"},"pagePublicationStatus":{"description":"Site pages to sync by current publication status. Omitted means both for compatibility.","type":"string","enum":["published","draft","both"]},"batchSize":{"type":"number"}},"required":["type","tenantId","siteUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gdrive"]},"authMode":{"type":"string","enum":["service_account","service_account_delegated","oauth"]},"delegatedAdminEmail":{"type":"string"},"connectedAccountEmail":{"type":"string"},"driveId":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["dropbox"]},"rootPath":{"type":"string"},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"},"recursive":{"type":"boolean"},"maxDepth":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["onedrive"]},"tenantId":{"type":"string","minLength":1},"userIds":{"minItems":1,"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","tenantId","userIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["asana"]},"workspaceGid":{"type":"string","minLength":1},"projectGids":{"type":"array","items":{"type":"string"}},"tagsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","workspaceGid"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"linearApiUrl":{"default":"https://api.linear.app"},"teamIds":{"type":"array","items":{"type":"string"}},"projectIds":{"type":"array","items":{"type":"string"}},"states":{"type":"array","items":{"type":"string"}},"includeComments":{"type":"boolean"},"includeProjects":{"type":"boolean"},"includeCycles":{"type":"boolean"},"batchSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","linearApiUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["outline"]},"outlineUrl":{},"collectionIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","outlineUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["salesforce"]},"authMethod":{"type":"string","enum":["oauth_client_credentials","soap_legacy"]},"clientId":{"type":"string","minLength":1},"loginUrl":{"default":"https://login.salesforce.com"},"objects":{"type":"array","items":{"type":"string","minLength":1}},"advancedObjectConfigJson":{"type":"string"}},"required":["type","loginUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_crawler"]},"startUrl":{},"renderJavaScript":{"type":"boolean"},"renderWaitMs":{"type":"integer","minimum":0,"maximum":10000},"additionalStartUrls":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"allowedOrigins":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"includePathPrefixes":{"type":"array","items":{"type":"string","minLength":1}},"excludePathPatterns":{"type":"array","items":{"type":"string","minLength":1}},"contentSelector":{"type":"string","minLength":1,"maxLength":500},"excludeSelectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"maxPages":{"type":"integer","minimum":1,"maximum":10000},"maxDepth":{"type":"integer","minimum":0,"maximum":50},"batchSize":{"type":"integer","minimum":1,"maximum":100},"requestDelayMs":{"type":"integer","minimum":0,"maximum":10000},"userAgent":{"type":"string","minLength":1},"allowPrivateNetwork":{"type":"boolean"}},"required":["type","startUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["perforce"]},"serverUrl":{},"depotPaths":{"minItems":1,"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string","pattern":"^\\.?[A-Za-z0-9_-]+$"}},"p4Port":{"type":"string","pattern":"^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"},"adminUsername":{"type":"string","minLength":1,"maxLength":256}},"required":["type","serverUrl","depotPaths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["mfiles"]},"baseUrl":{},"vaultGuid":{"type":"string","pattern":"^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"},"authMethod":{"type":"string","enum":["oauth_client_credentials","mfiles_password_token"]},"oauthTokenEndpoint":{},"oauthScope":{"type":"string","minLength":1},"oauthResource":{"type":"string","minLength":1},"oauthAuthConfig":{"type":"string","minLength":1},"oauthAuthConfigScope":{"type":"string","minLength":1},"oauthAccountName":{"type":"string","minLength":1},"oauthUseIdToken":{"type":"boolean"},"oauthClientAuthMethod":{"type":"string","enum":["client_secret_post","client_secret_basic"]},"domain":{"type":"string"},"objectTypeIds":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"batchSize":{"type":"integer","minimum":1,"maximum":500},"permissionExtensionMethod":{"type":"string","minLength":1}},"required":["type","baseUrl","vaultGuid"],"additionalProperties":false}]},"secretId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schedule":{"type":"string"},"ftsLanguage":{"$ref":"#/components/schemas/TextSearchLanguage"},"permissionSyncIntervalSeconds":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"lastSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"lastSyncError":{"nullable":true,"type":"string"},"lastPermissionSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastPermissionSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"checkpoint":{"nullable":true,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"aclConfigEpoch":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}}},"required":["id","organizationId","name","description","visibility","teamIds","syncPermissionsFromSource","connectorType","config","secretId","environmentId","schedule","ftsLanguage","permissionSyncIntervalSeconds","enabled","lastSyncAt","lastSyncStatus","lastSyncError","lastPermissionSyncAt","lastPermissionSyncStatus","checkpoint","aclConfigEpoch","createdByServiceAccountId","createdAt","updatedAt","deletedAt","createdBy","labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:create"]}}},"/api/connectors/{id}":{"get":{"operationId":"getConnector","tags":["Connectors"],"description":"Get a connector by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"visibility":{"type":"string","enum":["org-wide","team-scoped","auto-sync-permissions"]},"teamIds":{"type":"array","items":{"type":"string"}},"syncPermissionsFromSource":{"type":"boolean"},"connectorType":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]},{"type":"string","enum":["file_upload"]}]},"config":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["jira"]},"jiraBaseUrl":{},"isCloud":{"type":"boolean"},"projectKey":{"type":"string"},"jqlQuery":{"type":"string"},"commentEmailBlacklist":{"type":"array","items":{"type":"string"}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","jiraBaseUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["confluence"]},"confluenceUrl":{},"isCloud":{"type":"boolean"},"spaceKeys":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"cqlQuery":{"type":"string"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","confluenceUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"githubUrl":{},"owner":{"type":"string"},"authMethod":{"type":"string","enum":["pat","github_app","credential"]},"credentialId":{"type":"string","minLength":1,"maxLength":128},"githubAppConfigId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","enum":[""]}]},"repos":{"type":"array","items":{"type":"string"}},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"repositoryOverrides":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[^/\\\\\\s]+\\/[^/\\\\\\s]+$"},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}}},"required":["repository"],"additionalProperties":false}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","githubUrl","owner"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gitlab"]},"gitlabUrl":{},"projectIds":{"type":"array","items":{"type":"number"}},"groupId":{"type":"string"},"includeIssues":{"type":"boolean"},"includeMergeRequests":{"type":"boolean"},"includeMarkdownFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","gitlabUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["servicenow"]},"instanceUrl":{},"includeIncidents":{"type":"boolean"},"includeChanges":{"type":"boolean"},"includeChangeRequests":{"type":"boolean"},"includeProblems":{"type":"boolean"},"includeBusinessApps":{"type":"boolean"},"includeKnowledgeArticles":{"type":"boolean"},"states":{"type":"array","items":{"type":"string"}},"assignmentGroups":{"type":"array","items":{"type":"string"}},"roleAudiences":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"batchSize":{"type":"number"},"syncDataForLastMonths":{"type":"number","minimum":1,"maximum":12}},"required":["type","instanceUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["notion"]},"databaseIds":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["sharepoint"]},"tenantId":{"type":"string","minLength":1},"siteUrl":{},"driveIds":{"type":"array","items":{"type":"string"}},"folderPath":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"includePages":{"type":"boolean"},"pagePublicationStatus":{"description":"Site pages to sync by current publication status. Omitted means both for compatibility.","type":"string","enum":["published","draft","both"]},"batchSize":{"type":"number"}},"required":["type","tenantId","siteUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gdrive"]},"authMode":{"type":"string","enum":["service_account","service_account_delegated","oauth"]},"delegatedAdminEmail":{"type":"string"},"connectedAccountEmail":{"type":"string"},"driveId":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["dropbox"]},"rootPath":{"type":"string"},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"},"recursive":{"type":"boolean"},"maxDepth":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["onedrive"]},"tenantId":{"type":"string","minLength":1},"userIds":{"minItems":1,"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","tenantId","userIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["asana"]},"workspaceGid":{"type":"string","minLength":1},"projectGids":{"type":"array","items":{"type":"string"}},"tagsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","workspaceGid"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"linearApiUrl":{"default":"https://api.linear.app"},"teamIds":{"type":"array","items":{"type":"string"}},"projectIds":{"type":"array","items":{"type":"string"}},"states":{"type":"array","items":{"type":"string"}},"includeComments":{"type":"boolean"},"includeProjects":{"type":"boolean"},"includeCycles":{"type":"boolean"},"batchSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","linearApiUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["outline"]},"outlineUrl":{},"collectionIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","outlineUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["salesforce"]},"authMethod":{"type":"string","enum":["oauth_client_credentials","soap_legacy"]},"clientId":{"type":"string","minLength":1},"loginUrl":{"default":"https://login.salesforce.com"},"objects":{"type":"array","items":{"type":"string","minLength":1}},"advancedObjectConfigJson":{"type":"string"}},"required":["type","loginUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_crawler"]},"startUrl":{},"renderJavaScript":{"type":"boolean"},"renderWaitMs":{"type":"integer","minimum":0,"maximum":10000},"additionalStartUrls":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"allowedOrigins":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"includePathPrefixes":{"type":"array","items":{"type":"string","minLength":1}},"excludePathPatterns":{"type":"array","items":{"type":"string","minLength":1}},"contentSelector":{"type":"string","minLength":1,"maxLength":500},"excludeSelectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"maxPages":{"type":"integer","minimum":1,"maximum":10000},"maxDepth":{"type":"integer","minimum":0,"maximum":50},"batchSize":{"type":"integer","minimum":1,"maximum":100},"requestDelayMs":{"type":"integer","minimum":0,"maximum":10000},"userAgent":{"type":"string","minLength":1},"allowPrivateNetwork":{"type":"boolean"}},"required":["type","startUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["perforce"]},"serverUrl":{},"depotPaths":{"minItems":1,"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string","pattern":"^\\.?[A-Za-z0-9_-]+$"}},"p4Port":{"type":"string","pattern":"^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"},"adminUsername":{"type":"string","minLength":1,"maxLength":256}},"required":["type","serverUrl","depotPaths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["mfiles"]},"baseUrl":{},"vaultGuid":{"type":"string","pattern":"^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"},"authMethod":{"type":"string","enum":["oauth_client_credentials","mfiles_password_token"]},"oauthTokenEndpoint":{},"oauthScope":{"type":"string","minLength":1},"oauthResource":{"type":"string","minLength":1},"oauthAuthConfig":{"type":"string","minLength":1},"oauthAuthConfigScope":{"type":"string","minLength":1},"oauthAccountName":{"type":"string","minLength":1},"oauthUseIdToken":{"type":"boolean"},"oauthClientAuthMethod":{"type":"string","enum":["client_secret_post","client_secret_basic"]},"domain":{"type":"string"},"objectTypeIds":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"batchSize":{"type":"integer","minimum":1,"maximum":500},"permissionExtensionMethod":{"type":"string","minLength":1}},"required":["type","baseUrl","vaultGuid"],"additionalProperties":false}]},{"type":"object","additionalProperties":{}}]},"secretId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schedule":{"type":"string"},"ftsLanguage":{"$ref":"#/components/schemas/TextSearchLanguage"},"permissionSyncIntervalSeconds":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"lastSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"lastSyncError":{"nullable":true,"type":"string"},"lastPermissionSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastPermissionSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"checkpoint":{"nullable":true,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"aclConfigEpoch":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}},"totalDocsIngested":{"type":"number"}},"required":["id","organizationId","name","description","visibility","teamIds","syncPermissionsFromSource","connectorType","config","secretId","environmentId","schedule","ftsLanguage","permissionSyncIntervalSeconds","enabled","lastSyncAt","lastSyncStatus","lastSyncError","lastPermissionSyncAt","lastPermissionSyncStatus","checkpoint","aclConfigEpoch","createdByServiceAccountId","createdAt","updatedAt","deletedAt","createdBy","labels","totalDocsIngested"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}},"put":{"operationId":"updateConnector","tags":["Connectors"],"description":"Update a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"visibility":{"type":"string","enum":["org-wide","team-scoped","auto-sync-permissions"]},"teamIds":{"type":"array","items":{"type":"string"}},"config":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["jira"]},"jiraBaseUrl":{"type":"string"},"isCloud":{"type":"boolean"},"projectKey":{"type":"string"},"jqlQuery":{"type":"string"},"commentEmailBlacklist":{"type":"array","items":{"type":"string"}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","jiraBaseUrl","isCloud"]},{"type":"object","properties":{"type":{"type":"string","enum":["confluence"]},"confluenceUrl":{"type":"string"},"isCloud":{"type":"boolean"},"spaceKeys":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"cqlQuery":{"type":"string"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","confluenceUrl","isCloud"]},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"githubUrl":{"type":"string"},"owner":{"type":"string"},"authMethod":{"type":"string","enum":["pat","github_app","credential"]},"credentialId":{"type":"string","minLength":1,"maxLength":128},"githubAppConfigId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","enum":[""]}]},"repos":{"type":"array","items":{"type":"string"}},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"repositoryOverrides":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[^/\\\\\\s]+\\/[^/\\\\\\s]+$"},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}}},"required":["repository"]}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","githubUrl","owner"]},{"type":"object","properties":{"type":{"type":"string","enum":["gitlab"]},"gitlabUrl":{"type":"string"},"projectIds":{"type":"array","items":{"type":"number"}},"groupId":{"type":"string"},"includeIssues":{"type":"boolean"},"includeMergeRequests":{"type":"boolean"},"includeMarkdownFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","gitlabUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["servicenow"]},"instanceUrl":{"type":"string"},"includeIncidents":{"type":"boolean"},"includeChanges":{"type":"boolean"},"includeChangeRequests":{"type":"boolean"},"includeProblems":{"type":"boolean"},"includeBusinessApps":{"type":"boolean"},"includeKnowledgeArticles":{"type":"boolean"},"states":{"type":"array","items":{"type":"string"}},"assignmentGroups":{"type":"array","items":{"type":"string"}},"roleAudiences":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"batchSize":{"type":"number"},"syncDataForLastMonths":{"type":"number","minimum":1,"maximum":12}},"required":["type","instanceUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["notion"]},"databaseIds":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["sharepoint"]},"tenantId":{"type":"string","minLength":1},"siteUrl":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderPath":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"includePages":{"type":"boolean"},"pagePublicationStatus":{"description":"Site pages to sync by current publication status. Omitted means both for compatibility.","type":"string","enum":["published","draft","both"]},"batchSize":{"type":"number"}},"required":["type","tenantId","siteUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["gdrive"]},"authMode":{"type":"string","enum":["service_account","service_account_delegated","oauth"]},"delegatedAdminEmail":{"type":"string"},"connectedAccountEmail":{"type":"string"},"driveId":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["dropbox"]},"rootPath":{"type":"string"},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"},"recursive":{"type":"boolean"},"maxDepth":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["onedrive"]},"tenantId":{"type":"string","minLength":1},"userIds":{"minItems":1,"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","tenantId","userIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["asana"]},"workspaceGid":{"type":"string","minLength":1},"projectGids":{"type":"array","items":{"type":"string"}},"tagsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","workspaceGid"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"linearApiUrl":{"type":"string"},"teamIds":{"type":"array","items":{"type":"string"}},"projectIds":{"type":"array","items":{"type":"string"}},"states":{"type":"array","items":{"type":"string"}},"includeComments":{"type":"boolean"},"includeProjects":{"type":"boolean"},"includeCycles":{"type":"boolean"},"batchSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["outline"]},"outlineUrl":{"type":"string"},"collectionIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","outlineUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["salesforce"]},"authMethod":{"type":"string","enum":["oauth_client_credentials","soap_legacy"]},"clientId":{"type":"string","minLength":1},"loginUrl":{"type":"string"},"objects":{"type":"array","items":{"type":"string","minLength":1}},"advancedObjectConfigJson":{"type":"string"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_crawler"]},"startUrl":{"type":"string"},"renderJavaScript":{"type":"boolean"},"renderWaitMs":{"type":"integer","minimum":0,"maximum":10000},"additionalStartUrls":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"allowedOrigins":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"includePathPrefixes":{"type":"array","items":{"type":"string","minLength":1}},"excludePathPatterns":{"type":"array","items":{"type":"string","minLength":1}},"contentSelector":{"type":"string","minLength":1,"maxLength":500},"excludeSelectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"maxPages":{"type":"integer","minimum":1,"maximum":10000},"maxDepth":{"type":"integer","minimum":0,"maximum":50},"batchSize":{"type":"integer","minimum":1,"maximum":100},"requestDelayMs":{"type":"integer","minimum":0,"maximum":10000},"userAgent":{"type":"string","minLength":1},"allowPrivateNetwork":{"type":"boolean"}},"required":["type","startUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["perforce"]},"serverUrl":{"type":"string"},"depotPaths":{"minItems":1,"type":"array","items":{"type":"string","maxLength":1024}},"excludePaths":{"type":"array","items":{"type":"string","maxLength":1024}},"fileTypes":{"type":"array","items":{"type":"string","pattern":"^\\.?[A-Za-z0-9_-]+$"}},"p4Port":{"type":"string","pattern":"^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"},"adminUsername":{"type":"string","minLength":1,"maxLength":256}},"required":["type","serverUrl","depotPaths"]},{"type":"object","properties":{"type":{"type":"string","enum":["mfiles"]},"baseUrl":{"type":"string"},"vaultGuid":{"type":"string","pattern":"^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"},"authMethod":{"type":"string","enum":["oauth_client_credentials","mfiles_password_token"]},"oauthTokenEndpoint":{"type":"string"},"oauthScope":{"type":"string","minLength":1},"oauthResource":{"type":"string","minLength":1},"oauthAuthConfig":{"type":"string","minLength":1},"oauthAuthConfigScope":{"type":"string","minLength":1},"oauthAccountName":{"type":"string","minLength":1},"oauthUseIdToken":{"type":"boolean"},"oauthClientAuthMethod":{"type":"string","enum":["client_secret_post","client_secret_basic"]},"domain":{"type":"string"},"objectTypeIds":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"batchSize":{"type":"integer","minimum":1,"maximum":500},"permissionExtensionMethod":{"type":"string","minLength":1}},"required":["type","baseUrl","vaultGuid"]}]},"credentials":{"type":"object","properties":{"email":{"type":"string"},"apiToken":{"type":"string"},"adminApiKey":{"type":"string"},"githubApp":{"type":"object","properties":{"githubUrl":{"type":"string"},"appId":{"type":"string"},"installationId":{"type":"string"}},"required":["githubUrl","appId","installationId"]},"googleOAuth":{"type":"object","properties":{"clientId":{"type":"string"},"clientSecret":{"type":"string"},"refreshToken":{"type":"string"}},"required":["clientId","clientSecret"]}}},"schedule":{"type":"string"},"ftsLanguage":{"allOf":[{"$ref":"#/components/schemas/TextSearchLanguageInput"}]},"permissionSyncIntervalSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"labels":{"description":"Key/value labels. Omit to leave existing labels untouched; pass [] to clear them.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"]}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"visibility":{"type":"string","enum":["org-wide","team-scoped","auto-sync-permissions"]},"teamIds":{"type":"array","items":{"type":"string"}},"syncPermissionsFromSource":{"type":"boolean"},"connectorType":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]},{"type":"string","enum":["file_upload"]}]},"config":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["jira"]},"jiraBaseUrl":{},"isCloud":{"type":"boolean"},"projectKey":{"type":"string"},"jqlQuery":{"type":"string"},"commentEmailBlacklist":{"type":"array","items":{"type":"string"}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","jiraBaseUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["confluence"]},"confluenceUrl":{},"isCloud":{"type":"boolean"},"spaceKeys":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"cqlQuery":{"type":"string"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","confluenceUrl","isCloud"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"githubUrl":{},"owner":{"type":"string"},"authMethod":{"type":"string","enum":["pat","github_app","credential"]},"credentialId":{"type":"string","minLength":1,"maxLength":128},"githubAppConfigId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","enum":[""]}]},"repos":{"type":"array","items":{"type":"string"}},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"repositoryOverrides":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[^/\\\\\\s]+\\/[^/\\\\\\s]+$"},"includeIssues":{"type":"boolean"},"includePullRequests":{"type":"boolean"},"includeRepositoryFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string"}},"includePaths":{"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}}},"required":["repository"],"additionalProperties":false}},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","githubUrl","owner"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gitlab"]},"gitlabUrl":{},"projectIds":{"type":"array","items":{"type":"number"}},"groupId":{"type":"string"},"includeIssues":{"type":"boolean"},"includeMergeRequests":{"type":"boolean"},"includeMarkdownFiles":{"type":"boolean"},"labelsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","gitlabUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["servicenow"]},"instanceUrl":{},"includeIncidents":{"type":"boolean"},"includeChanges":{"type":"boolean"},"includeChangeRequests":{"type":"boolean"},"includeProblems":{"type":"boolean"},"includeBusinessApps":{"type":"boolean"},"includeKnowledgeArticles":{"type":"boolean"},"states":{"type":"array","items":{"type":"string"}},"assignmentGroups":{"type":"array","items":{"type":"string"}},"roleAudiences":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"batchSize":{"type":"number"},"syncDataForLastMonths":{"type":"number","minimum":1,"maximum":12}},"required":["type","instanceUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["notion"]},"databaseIds":{"type":"array","items":{"type":"string"}},"pageIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["sharepoint"]},"tenantId":{"type":"string","minLength":1},"siteUrl":{},"driveIds":{"type":"array","items":{"type":"string"}},"folderPath":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"includePages":{"type":"boolean"},"pagePublicationStatus":{"description":"Site pages to sync by current publication status. Omitted means both for compatibility.","type":"string","enum":["published","draft","both"]},"batchSize":{"type":"number"}},"required":["type","tenantId","siteUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gdrive"]},"authMode":{"type":"string","enum":["service_account","service_account_delegated","oauth"]},"delegatedAdminEmail":{"type":"string"},"connectedAccountEmail":{"type":"string"},"driveId":{"type":"string"},"driveIds":{"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["dropbox"]},"rootPath":{"type":"string"},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"},"recursive":{"type":"boolean"},"maxDepth":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["onedrive"]},"tenantId":{"type":"string","minLength":1},"userIds":{"minItems":1,"type":"array","items":{"type":"string"}},"folderId":{"type":"string"},"recursive":{"type":"boolean"},"maxDepth":{"type":"integer","minimum":1,"maximum":100},"fileTypes":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","tenantId","userIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["asana"]},"workspaceGid":{"type":"string","minLength":1},"projectGids":{"type":"array","items":{"type":"string"}},"tagsToSkip":{"type":"array","items":{"type":"string"}}},"required":["type","workspaceGid"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"linearApiUrl":{"default":"https://api.linear.app"},"teamIds":{"type":"array","items":{"type":"string"}},"projectIds":{"type":"array","items":{"type":"string"}},"states":{"type":"array","items":{"type":"string"}},"includeComments":{"type":"boolean"},"includeProjects":{"type":"boolean"},"includeCycles":{"type":"boolean"},"batchSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","linearApiUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["outline"]},"outlineUrl":{},"collectionIds":{"type":"array","items":{"type":"string"}},"batchSize":{"type":"number"}},"required":["type","outlineUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["salesforce"]},"authMethod":{"type":"string","enum":["oauth_client_credentials","soap_legacy"]},"clientId":{"type":"string","minLength":1},"loginUrl":{"default":"https://login.salesforce.com"},"objects":{"type":"array","items":{"type":"string","minLength":1}},"advancedObjectConfigJson":{"type":"string"}},"required":["type","loginUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_crawler"]},"startUrl":{},"renderJavaScript":{"type":"boolean"},"renderWaitMs":{"type":"integer","minimum":0,"maximum":10000},"additionalStartUrls":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"allowedOrigins":{"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}},"includePathPrefixes":{"type":"array","items":{"type":"string","minLength":1}},"excludePathPatterns":{"type":"array","items":{"type":"string","minLength":1}},"contentSelector":{"type":"string","minLength":1,"maxLength":500},"excludeSelectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"maxPages":{"type":"integer","minimum":1,"maximum":10000},"maxDepth":{"type":"integer","minimum":0,"maximum":50},"batchSize":{"type":"integer","minimum":1,"maximum":100},"requestDelayMs":{"type":"integer","minimum":0,"maximum":10000},"userAgent":{"type":"string","minLength":1},"allowPrivateNetwork":{"type":"boolean"}},"required":["type","startUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["perforce"]},"serverUrl":{},"depotPaths":{"minItems":1,"type":"array","items":{"type":"string"}},"excludePaths":{"type":"array","items":{"type":"string"}},"fileTypes":{"type":"array","items":{"type":"string","pattern":"^\\.?[A-Za-z0-9_-]+$"}},"p4Port":{"type":"string","pattern":"^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"},"adminUsername":{"type":"string","minLength":1,"maxLength":256}},"required":["type","serverUrl","depotPaths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["mfiles"]},"baseUrl":{},"vaultGuid":{"type":"string","pattern":"^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"},"authMethod":{"type":"string","enum":["oauth_client_credentials","mfiles_password_token"]},"oauthTokenEndpoint":{},"oauthScope":{"type":"string","minLength":1},"oauthResource":{"type":"string","minLength":1},"oauthAuthConfig":{"type":"string","minLength":1},"oauthAuthConfigScope":{"type":"string","minLength":1},"oauthAccountName":{"type":"string","minLength":1},"oauthUseIdToken":{"type":"boolean"},"oauthClientAuthMethod":{"type":"string","enum":["client_secret_post","client_secret_basic"]},"domain":{"type":"string"},"objectTypeIds":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"batchSize":{"type":"integer","minimum":1,"maximum":500},"permissionExtensionMethod":{"type":"string","minLength":1}},"required":["type","baseUrl","vaultGuid"],"additionalProperties":false}]},"secretId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schedule":{"type":"string"},"ftsLanguage":{"$ref":"#/components/schemas/TextSearchLanguage"},"permissionSyncIntervalSeconds":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"lastSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"lastSyncError":{"nullable":true,"type":"string"},"lastPermissionSyncAt":{"nullable":true,"type":"string","format":"date-time"},"lastPermissionSyncStatus":{"nullable":true,"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"checkpoint":{"nullable":true,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"aclConfigEpoch":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","service_account"]},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","value"],"additionalProperties":false}}},"required":["id","organizationId","name","description","visibility","teamIds","syncPermissionsFromSource","connectorType","config","secretId","environmentId","schedule","ftsLanguage","permissionSyncIntervalSeconds","enabled","lastSyncAt","lastSyncStatus","lastSyncError","lastPermissionSyncAt","lastPermissionSyncStatus","checkpoint","aclConfigEpoch","createdByServiceAccountId","createdAt","updatedAt","deletedAt","createdBy","labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}},"delete":{"operationId":"deleteConnector","tags":["Connectors"],"description":"Delete a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete): Delete Knowledge Bases and Connectors, view the deleted ones, and restore them","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:delete"]}}},"/api/connectors/{id}/documents":{"get":{"operationId":"getConnectorDocuments","tags":["Connectors"],"description":"List documents for a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"group","required":false,"description":"Only documents whose effective audience grants this upstream group (auto-sync-permissions connectors)"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"sourceId":{"nullable":true,"type":"string"},"connectorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"contentHash":{"type":"string"},"sourceUrl":{"nullable":true,"type":"string"},"acl":{"type":"array","items":{"type":"string","pattern":"^(org:\\*|team:.+|user_email:.+|group:.+|container:.+)$"}},"metadata":{"nullable":true,"type":"object","additionalProperties":{}},"embeddingStatus":{"type":"string","enum":["pending","processing","completed","failed"]},"chunkCount":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"connectorType":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]},{"type":"string","enum":["file_upload"]}]}},"required":["id","organizationId","sourceId","connectorId","title","contentHash","sourceUrl","acl","metadata","embeddingStatus","chunkCount","createdAt","updatedAt","connectorType"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"currentPage":{"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}},"required":["currentPage","limit","total","totalPages","hasNext","hasPrev"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}}},"/api/connectors/{id}/documents/{docId}":{"get":{"operationId":"getConnectorDocument","tags":["Connectors"],"description":"Get a single connector document\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"docId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"sourceId":{"nullable":true,"type":"string"},"connectorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"content":{"type":"string"},"contentHash":{"type":"string"},"sourceUrl":{"nullable":true,"type":"string"},"acl":{"type":"array","items":{"type":"string","pattern":"^(org:\\*|team:.+|user_email:.+|group:.+|container:.+)$"}},"metadata":{"nullable":true,"type":"object","additionalProperties":{}},"embeddingStatus":{"type":"string","enum":["pending","processing","completed","failed"]},"chunkCount":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"connectorType":{"anyOf":[{"type":"string","enum":["jira"]},{"type":"string","enum":["confluence"]},{"type":"string","enum":["github"]},{"type":"string","enum":["gitlab"]},{"type":"string","enum":["servicenow"]},{"type":"string","enum":["notion"]},{"type":"string","enum":["sharepoint"]},{"type":"string","enum":["gdrive"]},{"type":"string","enum":["dropbox"]},{"type":"string","enum":["onedrive"]},{"type":"string","enum":["asana"]},{"type":"string","enum":["linear"]},{"type":"string","enum":["outline"]},{"type":"string","enum":["salesforce"]},{"type":"string","enum":["web_crawler"]},{"type":"string","enum":["perforce"]},{"type":"string","enum":["mfiles"]},{"type":"string","enum":["file_upload"]}]}},"required":["id","organizationId","sourceId","connectorId","title","content","contentHash","sourceUrl","acl","metadata","embeddingStatus","chunkCount","createdAt","updatedAt","connectorType"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}},"delete":{"operationId":"deleteConnectorDocument","tags":["Connectors"],"description":"Delete a connector document\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete): Delete Knowledge Bases and Connectors, view the deleted ones, and restore them","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"docId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:delete"]}}},"/api/connectors/{id}/documents/bulk":{"delete":{"operationId":"bulkDeleteConnectorDocuments","tags":["Connectors"],"description":"Delete several of a connector's synced documents in one request. Ids belonging to a different connector — or to no document at all — are reported in `failed` as not found and leave the rest of the batch applied. Deleting a synced document removes it until the next sync brings it back; to stop it returning, remove it at the source or narrow the connector's scope.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete): Delete Knowledge Bases and Connectors, view the deleted ones, and restore them","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string"},"description":"Ids to act on. Duplicates are collapsed."}},"required":["ids"]},{"type":"object","properties":{"all":{"type":"boolean","enum":[true],"description":"Delete everything matching the filters below rather than an id list."},"search":{"description":"Same title search the listing applies.","type":"string"},"group":{"description":"Same group filter the listing applies.","type":"string"}},"required":["all"],"description":"Filter mode. A connector's corpus routinely runs to tens of thousands of documents, which is neither a sane request body as uuids nor worth authorizing row by row — so the filter travels instead and the database does the work in one statement. The response carries `affected` rather than a per-row list."}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"affected":{"type":"number"},"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"error":{"type":"string"}},"required":["id","name","error"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:delete"]}}},"/api/connectors/bulk":{"patch":{"operationId":"bulkUpdateConnectors","tags":["Connectors"],"description":"Change who can see several connectors in one request. Every connector in the batch moves to the same audience, and the ACL refresh each one needs runs per connector exactly as the single update runs it. `auto-sync-permissions` is deliberately not accepted here: switching a connector to it fail-closes its whole corpus until a permission pass completes, and it is gated on the connector's own type, so it stays a per-connector decision.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string"},"description":"Ids to act on. Duplicates are collapsed."},"visibility":{"type":"string","enum":["org-wide","team-scoped"],"description":"The audience every connector in the batch moves to."},"teamIds":{"description":"Only meaningful for `team-scoped`; required there.","type":"array","items":{"type":"string"}}},"required":["ids","visibility"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"affected":{"type":"number"},"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"error":{"type":"string"}},"required":["id","name","error"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}},"delete":{"operationId":"bulkDeleteConnectors","tags":["Connectors"],"description":"Soft-delete several connectors in one request. As with the single delete, each one's queued syncs are cancelled and its stored credential is destroyed — a restored connector comes back disabled and re-authenticates. A connector the caller may not delete is reported in `failed` while the rest of the batch still applies.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete): Delete Knowledge Bases and Connectors, view the deleted ones, and restore them","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string"},"description":"Ids to act on. Duplicates are collapsed."}},"required":["ids"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"affected":{"type":"number"},"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"error":{"type":"string"}},"required":["id","name","error"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:delete"]}}},"/api/connectors/{id}/restore":{"post":{"operationId":"restoreConnector","tags":["Connectors"],"description":"Restore a soft-deleted connector. The stored credential was destroyed when the connector was deleted, so it is restored DISABLED — re-authenticate, then re-enable it to resume syncing. 404 if there is no soft-deleted connector with that id in the org that the caller may manage — restoring one is gated on the same visibility as editing or deleting it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete): Delete Knowledge Bases and Connectors, view the deleted ones, and restore them","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:delete"]}}},"/api/connectors/{id}/permanent":{"delete":{"operationId":"permanentlyDeleteConnector","tags":["Connectors"],"description":"Permanently destroy a soft-deleted connector (global admins only — a [`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete) or `knowledgeSource:admin` grant reaches the trash, not past it). Irreversible, with no grace period: its synced documents and their chunks, run history, access mappings, and assignments are all destroyed. 404 if there is no soft-deleted connector with that id in the org, which is also the answer when it is still live or the caller is not a global admin. Restore wins a race.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:delete`](/docs/reference/permissions#knowledgeSource:delete): Delete Knowledge Bases and Connectors, view the deleted ones, and restore them","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:delete"]}}},"/api/connectors/{id}/sync":{"post":{"operationId":"syncConnector","tags":["Connectors"],"description":"Manually trigger a connector sync\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string"}},"required":["taskId","status"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/{id}/permission-sync":{"post":{"operationId":"triggerPermissionSync","tags":["Connectors"],"description":"Manually trigger a permission-sync pass for an auto-sync-permissions connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string"}},"required":["taskId","status"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/{id}/permission-coverage":{"get":{"operationId":"getPermissionSyncCoverage","tags":["Connectors"],"description":"Live ACL coverage for an auto-sync-permissions connector: how many ingested documents are tagged vs still fail-closed (awaiting a permission-sync pass)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalDocuments":{"type":"number"},"failClosedDocuments":{"type":"number"},"permissionSyncRunning":{"type":"boolean"},"nextScheduledAt":{"nullable":true,"type":"string"}},"required":["totalDocuments","failClosedDocuments","permissionSyncRunning","nextScheduledAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}}},"/api/connectors/{id}/user-groups":{"get":{"operationId":"getConnectorUserGroups","tags":["Connectors"],"description":"Synced external user groups for an auto-sync-permissions connector: each group's member emails, the Archestra org users they resolve to, and how many documents grant the group\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"truncated":{"type":"boolean"},"totalMemberships":{"type":"number"},"groups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string"},"name":{"nullable":true,"type":"string"},"token":{"type":"string"},"documentCount":{"type":"number"},"lastSyncedAt":{"nullable":true,"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"displayName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"accountType":{"nullable":true,"type":"string"},"user":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"resolvedVia":{"nullable":true,"type":"string","enum":["override","email"]}},"required":["accountId","displayName","email","accountType","user","resolvedVia"],"additionalProperties":false}}},"required":["groupId","name","token","documentCount","lastSyncedAt","members"],"additionalProperties":false}}},"required":["truncated","totalMemberships","groups"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}}},"/api/connectors/{id}/member-overrides":{"put":{"operationId":"upsertConnectorMemberOverride","tags":["Connectors"],"description":"Manually map an upstream member account to an Archestra user for an auto-sync-permissions connector — the admin escape hatch when the upstream hides the member's email from every credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalAccountId":{"type":"string","minLength":1},"userId":{"type":"string","minLength":1}},"required":["externalAccountId","userId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/{id}/member-overrides/{externalAccountId}":{"delete":{"operationId":"deleteConnectorMemberOverride","tags":["Connectors"],"description":"Remove a manual member mapping; the member falls back to email-based resolution (fail-closed when the upstream hides their email)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"externalAccountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/{id}/force-resync":{"post":{"operationId":"forceResyncConnector","tags":["Connectors"],"description":"Force a full re-sync: deletes all documents, chunks, run history, and resets the checkpoint\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string"}},"required":["taskId","status"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/{id}/test":{"post":{"operationId":"testConnectorConnection","tags":["Connectors"],"description":"Test a connector connection\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}}},"/api/connectors/{id}/gdrive/oauth/start":{"post":{"operationId":"startGoogleDriveConnectorOAuth","tags":["Connectors"],"description":"Begin the Google authorization-code flow for a Google Drive connector in individual mode. Returns the URL to send the browser to; the connector being authorized travels in a signed state parameter, because Google matches the redirect URI exactly.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnTo":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string"}},"required":["authorizationUrl"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/gdrive/oauth/callback":{"get":{"operationId":"completeGoogleDriveConnectorOAuth","tags":["Connectors"],"description":"Where Google returns the browser after an individual Google Drive authorization. Requires the session of the person who started the flow: the signed state proves only that this deployment issued a flow, so on its own it would let one person's authorization be redeemed onto another person's connector.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string"},"in":"query","name":"code","required":false},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"error","required":false}],"responses":{"200":{"description":"Default Response"}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/{id}/knowledge-bases":{"post":{"operationId":"assignConnectorToKnowledgeBases","tags":["Connectors"],"description":"Assign a connector to one or more knowledge bases\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"knowledgeBaseIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["knowledgeBaseIds"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}},"get":{"operationId":"getConnectorKnowledgeBases","tags":["Connectors"],"description":"List knowledge bases assigned to a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"visibility":{"type":"string","enum":["private","org-wide","team-scoped"]},"teamIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"createdBy":{"nullable":true,"type":"string"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","organizationId","name","description","visibility","teamIds","status","createdBy","createdByServiceAccountId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}}},"/api/connectors/{id}/knowledge-bases/{kbId}":{"delete":{"operationId":"unassignConnectorFromKnowledgeBase","tags":["Connectors"],"description":"Unassign a connector from a knowledge base\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"kbId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/connectors/{id}/runs":{"get":{"operationId":"getConnectorRuns","tags":["Connectors"],"description":"List connector runs\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string","enum":["content","permission"]},"in":"query","name":"runType","required":false},{"schema":{"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["changes","no-changes"]},"in":"query","name":"result","required":false,"description":"Only runs that changed something (or nothing)"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"connectorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"runType":{"type":"string","enum":["content","permission"]},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"nullable":true,"type":"string","format":"date-time"},"documentsProcessed":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"documentsIngested":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"totalItems":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"totalBatches":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"completedBatches":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"itemErrors":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"itemsSkipped":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"documentsWithoutText":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"error":{"nullable":true,"type":"string"},"checkpoint":{"nullable":true,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"stats":{"nullable":true,"type":"object","properties":{"mode":{"type":"string","enum":["full","delta"]},"totalDocs":{"type":"number"},"docsScanned":{"type":"number"},"aclsChanged":{"type":"number"},"chunksRewritten":{"type":"number"},"failClosed":{"type":"number"},"groupsSynced":{"type":"number"},"membershipsUpserted":{"type":"number"},"membershipsRemoved":{"type":"number"},"containersSynced":{"type":"number"},"containersChanged":{"type":"number"},"containerAudienceFailures":{"type":"number"},"docsAdopted":{"type":"number"},"docsReassigned":{"type":"number"},"groupSyncFailed":{"type":"boolean"},"contentSyncActiveDuringRun":{"type":"boolean"}},"required":["totalDocs","docsScanned","aclsChanged","chunksRewritten","failClosed","groupsSynced","membershipsUpserted","contentSyncActiveDuringRun"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","connectorId","status","runType","startedAt","completedAt","documentsProcessed","documentsIngested","totalItems","totalBatches","completedBatches","itemErrors","itemsSkipped","documentsWithoutText","error","checkpoint","stats","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"currentPage":{"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}},"required":["currentPage","limit","total","totalPages","hasNext","hasPrev"],"additionalProperties":false},"queued":{"type":"object","properties":{"content":{"type":"boolean"},"permission":{"type":"boolean"}},"required":["content","permission"],"additionalProperties":false}},"required":["data","pagination","queued"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}}},"/api/connectors/{id}/runs/{runId}":{"get":{"operationId":"getConnectorRun","tags":["Connectors"],"description":"Get a single connector run (including logs)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:read`](/docs/reference/permissions#knowledgeSource:read): View Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"connectorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","success","completed_with_errors","no_documents","failed","partial","cancelled","superseded"]},"runType":{"type":"string","enum":["content","permission"]},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"nullable":true,"type":"string","format":"date-time"},"documentsProcessed":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"documentsIngested":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"totalItems":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"totalBatches":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"completedBatches":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"itemErrors":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"itemsSkipped":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"documentsWithoutText":{"nullable":true,"type":"integer","minimum":-2147483648,"maximum":2147483647},"error":{"nullable":true,"type":"string"},"logs":{"nullable":true,"type":"string"},"checkpoint":{"nullable":true,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"stats":{"nullable":true,"type":"object","properties":{"mode":{"type":"string","enum":["full","delta"]},"totalDocs":{"type":"number"},"docsScanned":{"type":"number"},"aclsChanged":{"type":"number"},"chunksRewritten":{"type":"number"},"failClosed":{"type":"number"},"groupsSynced":{"type":"number"},"membershipsUpserted":{"type":"number"},"membershipsRemoved":{"type":"number"},"containersSynced":{"type":"number"},"containersChanged":{"type":"number"},"containerAudienceFailures":{"type":"number"},"docsAdopted":{"type":"number"},"docsReassigned":{"type":"number"},"groupSyncFailed":{"type":"boolean"},"contentSyncActiveDuringRun":{"type":"boolean"}},"required":["totalDocs","docsScanned","aclsChanged","chunksRewritten","failClosed","groupsSynced","membershipsUpserted","contentSyncActiveDuringRun"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","connectorId","status","runType","startedAt","completedAt","documentsProcessed","documentsIngested","totalItems","totalBatches","completedBatches","itemErrors","itemsSkipped","documentsWithoutText","error","logs","checkpoint","stats","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:read"]}}},"/api/connectors/{id}/runs/{runId}/cancel":{"post":{"operationId":"cancelConnectorRun","tags":["Connectors"],"description":"Cancel an in-progress document sync. Documents already ingested remain available; the worker stops before writing its next source batch.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`knowledgeSource:update`](/docs/reference/permissions#knowledgeSource:update): Modify Knowledge Bases and Connectors","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"type":"boolean","enum":[true]}},"required":["cancelled"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["knowledgeSource:update"]}}},"/api/credentials/{key}/github/start":{"post":{"operationId":"startGitHubUserConnection","tags":["Credentials"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string"}},"required":["authorizationUrl"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]},"description":"Authentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)"}},"/api/credentials/github/callback":{"post":{"operationId":"completeGitHubUserConnection","tags":["Credentials"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":256},"code":{"type":"string","minLength":1,"maxLength":512}},"required":["state","code"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"login":{"type":"string"},"configured":{"type":"boolean","enum":[true]}},"required":["id","login","configured"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:read"]},"description":"Authentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:read`](/docs/reference/permissions#credential:read): Open Credentials"}},"/api/credentials":{"get":{"operationId":"listRuntimeCredentials","tags":["Credentials"],"description":"List reusable credentials available to platform integrations\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n[`credential:read`](/docs/reference/permissions#credential:read): Open Credentials","parameters":[{"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["mine","shared","org","others"]}},"in":"query","name":"access","required":false,"description":"Keep only objects the caller reaches in one of these ways (comma-separated): mine (authored by the caller), shared (shared with the caller or one of their teams), org (shared with the organization), others (visible only through organization-wide authority). Omit for every readable object."},{"schema":{"minItems":1,"type":"array","items":{"type":"string"}},"in":"query","name":"sharedWith","required":false,"description":"Keep only objects whose own permissions grant read to one of these subjects (comma-separated): org (the whole organization), role:<roleId>, team:<teamId>, user:<userId>, serviceAccount:<serviceAccountId>. Grants inherited from organization-wide permissions do not count. Omit for no filtering."},{"schema":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"in":"query","name":"owner","required":false,"description":"Keep only objects authored by one of these user IDs (comma-separated). Narrows the rows the caller can already read. Omit for no filtering."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["secret","github_app","github_app_user","gitlab_token"]},"githubUrl":{"nullable":true,"type":"string"},"gitlabUrl":{"nullable":true,"type":"string"},"appId":{"nullable":true,"type":"string"},"installationId":{"nullable":true,"type":"string"},"githubClientId":{"nullable":true,"type":"string"},"githubAppCredentialKey":{"nullable":true,"type":"string"},"key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9._-]*$"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"nullable":true,"type":"string"},"builtIn":{"type":"boolean"},"allowPersonal":{"type":"boolean"},"allowOrganization":{"type":"boolean"},"personalConfigured":{"type":"boolean"},"organizationConfigured":{"type":"boolean"}},"required":["id","kind","githubUrl","gitlabUrl","appId","installationId","githubClientId","githubAppCredentialKey","key","name","description","icon","builtIn","allowPersonal","allowOrganization","personalConfigured","organizationConfigured"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"static","permissions":["credential:read"]}},"post":{"operationId":"createRuntimeCredential","tags":["Credentials"],"description":"Create a credential definition\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on the credential being created. A credential just for the caller (`allowPersonal: true`, `allowOrganization: false`, no `initialGrants`) needs no permission, and only its author can reach it. Organization credentials and credentials created with grants require [`credential:create`](/docs/reference/permissions#credential:create).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9._-]*$"},"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["secret","github_app","github_app_user","gitlab_token"]},"githubUrl":{"nullable":true,"type":"string"},"appId":{"nullable":true,"type":"string"},"installationId":{"nullable":true,"type":"string"},"githubClientId":{"nullable":true,"type":"string"},"githubAppCredentialKey":{"nullable":true,"type":"string"},"gitlabUrl":{"nullable":true,"type":"string"},"description":{"type":"string","maxLength":1000},"icon":{"nullable":true,"type":"string","maxLength":700000},"allowPersonal":{"type":"boolean"},"allowOrganization":{"type":"boolean"},"initialGrants":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["team"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["serviceAccount"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["role"]},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["organization"]},"id":{"type":"string","enum":["*"]}},"required":["type","id"]}]},"actions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["read","use","update","delete","manage-permissions","configure-deployment-spec"]}}},"required":["subject","actions"]}}},"required":["key","name"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["secret","github_app","github_app_user","gitlab_token"]},"githubUrl":{"nullable":true,"type":"string"},"appId":{"nullable":true,"type":"string"},"installationId":{"nullable":true,"type":"string"},"githubClientId":{"nullable":true,"type":"string"},"githubAppCredentialKey":{"nullable":true,"type":"string"},"gitlabUrl":{"nullable":true,"type":"string"},"description":{"type":"string"},"icon":{"nullable":true,"type":"string"},"allowPersonal":{"type":"boolean"},"allowOrganization":{"type":"boolean"},"createdBy":{"nullable":true,"type":"string"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","key","name","kind","githubUrl","appId","installationId","githubClientId","githubAppCredentialKey","gitlabUrl","description","icon","allowPersonal","allowOrganization","createdBy","createdByServiceAccountId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"dynamic","note":"Checked dynamically based on the credential being created. A credential just for the caller (`allowPersonal: true`, `allowOrganization: false`, no `initialGrants`) needs no permission, and only its author can reach it. Organization credentials and credentials created with grants require `credential:create`.","permissions":[]}}},"/api/credentials/{key}/usage":{"get":{"operationId":"getRuntimeCredentialUsage","tags":["Credentials"],"description":"List resources using a saved credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"kind":{"type":"string","enum":["mcp","skill","plugin","knowledge","copilot"]}},"required":["id","name","kind"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["resources","agents"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/credentials/{key}":{"patch":{"operationId":"updateRuntimeCredential","tags":["Credentials"],"description":"Update a credential definition\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"githubUrl":{"nullable":true,"type":"string"},"gitlabUrl":{"nullable":true,"type":"string"},"appId":{"nullable":true,"type":"string"},"installationId":{"nullable":true,"type":"string"},"githubClientId":{"nullable":true,"type":"string"},"githubAppCredentialKey":{"nullable":true,"type":"string"},"description":{"type":"string","maxLength":1000},"icon":{"nullable":true,"type":"string","maxLength":700000}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["secret","github_app","github_app_user","gitlab_token"]},"githubUrl":{"nullable":true,"type":"string"},"appId":{"nullable":true,"type":"string"},"installationId":{"nullable":true,"type":"string"},"githubClientId":{"nullable":true,"type":"string"},"githubAppCredentialKey":{"nullable":true,"type":"string"},"gitlabUrl":{"nullable":true,"type":"string"},"description":{"type":"string"},"icon":{"nullable":true,"type":"string"},"allowPersonal":{"type":"boolean"},"allowOrganization":{"type":"boolean"},"createdBy":{"nullable":true,"type":"string"},"createdByServiceAccountId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","key","name","kind","githubUrl","appId","installationId","githubClientId","githubAppCredentialKey","gitlabUrl","description","icon","allowPersonal","allowOrganization","createdBy","createdByServiceAccountId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"deleteRuntimeCredential","tags":["Credentials"],"description":"Delete a credential definition\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/credentials/{key}/personal":{"put":{"operationId":"setPersonalRuntimeCredentialConnection","tags":["Credentials"],"description":"Connect a personal credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":20000}},"required":["value"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean","enum":[true]}},"required":["configured"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"deletePersonalRuntimeCredentialConnection","tags":["Credentials"],"description":"Disconnect a personal credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}},"/api/credentials/{key}/organization":{"put":{"operationId":"setOrganizationRuntimeCredentialConnection","tags":["Credentials"],"description":"Connect an organization credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":20000}},"required":["value"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean","enum":[true]}},"required":["configured"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}},"delete":{"operationId":"deleteOrganizationRuntimeCredentialConnection","tags":["Credentials"],"description":"Disconnect an organization credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_validation_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authentication_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_authorization_error"]},"internal_code":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_not_found_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_conflict_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["api_internal_server_error"]},"internal_code":{"type":"string"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"x-required-permissions":{"kind":"none","note":"None (no additional RBAC permission required)","permissions":[]}}}},"tags":[{"name":"Apps"},{"name":"Connectors"},{"name":"Connection Setups"},{"name":"Credentials"},{"name":"Git Credentials"},{"name":"GitHub App Configs"},{"name":"GitHub PATs"}]}