{
 "openapi": "3.1.0",
 "info": {
  "title": "Dyadic API",
  "version": "1.5.1",
  "description": "Use **Iris** from OpenAI-compatible apps and SDKs. Point the client's base URL at `https://api.dyadic.app/openai/v1` and use a\nDyadic API key.\n\n## Compatibility\nThe Dyadic API is a **subset** of OpenAI's API, not all of it. What each endpoint applies, limits and refuses is\nthe compatibility contract at [`/capabilities`](https://api.dyadic.app/openai/v1/capabilities) (also on every operation here as `x-dyadic-*`).\nAn OpenAI field the API knows but can't honor is refused with `400` and code `unsupported_parameter` (its name in\n`param`), never silently dropped. A field OpenAI doesn't define for the endpoint is ignored and named in the\n`X-Dyadic-Ignored-Parameters` response header. Tested with the official OpenAI Python SDK 3.26.0.\n\n## Authentication\nCreate a key in [Workspace API Keys](https://app.dyadic.app/developers/keys). Send it as `Authorization: Bearer dya-...`\n(or in an `api-key` or `x-api-key` header). Each key has its own permissions and limits. Keep long-lived keys on a\ntrusted application server. The website `/api/openai/v1` alias and API-host `/openai/v1` base describe the same surface.\n\n## Billing\nRequests use your account's AI credits (or the key's own provider key, when it carries one). Chat and text completions\ninclude the credits they used (`usage.dyadic` when streaming with `stream_options.include_usage`; otherwise `dyadic`\nand the `X-Dyadic-Credits` header); every request's credits are in your activity log. Credits start as a reserved\nestimate and settle when the provider receipt becomes available; the activity log updates when they do.\nMissing provider usage remains unknown, and a reserved estimate is not a final charge.\n\n## Streams and cancellation\nConsume the endpoint's terminal event. Closing a local stream or aborting HTTP does not establish provider\ncancellation or zero charges. Background Responses and batches have explicit cancellation endpoints.\nDo not replay an uncertain operation merely because its response was interrupted.\n\n## Models\n| Model | What it is |\n|---|---|\n| `iris` | Iris: writing, research, ideas, images and code in one assistant |\n| `iris-think` | Iris with the reasoning model: slower, more careful, more credits |\n\n`dyadic/iris` and the `-thinking` and `-reasoning` suffixes work too, and an OpenAI model name (`gpt-*`, `chatgpt-*`,\n`codex*`, `o1`, `o3`, `o4`...) runs as `iris`; responses name the model you sent. The thinking models need the key's\nthinking switch.\n\n## Endpoints\n| Family | Endpoints |\n|---|---|\n| Models | [`GET /models`](https://dyadic.app/developers/api/#dyadic-api/tag/discovery/GET/models), [`GET /models/{model}`](https://dyadic.app/developers/api/#dyadic-api/tag/discovery/GET/models/{model}) |\n| Chat | [`POST /chat/completions`](https://dyadic.app/developers/api/#dyadic-api/tag/chat/POST/chat/completions) (`store: true` keeps it 30 days: [`GET /chat/completions`](https://dyadic.app/developers/api/#dyadic-api/tag/chat/GET/chat/completions), `GET`/`POST`/[`DELETE /chat/completions/{id}`](https://dyadic.app/developers/api/#dyadic-api/tag/chat/DELETE/chat/completions/{completion_id}), [`GET /chat/completions/{id}/messages`](https://dyadic.app/developers/api/#dyadic-api/tag/chat/GET/chat/completions/{completion_id}/messages)), [`POST /completions`](https://dyadic.app/developers/api/#dyadic-api/tag/completions/POST/completions) |\n| Responses | [`POST /responses`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/POST/responses) (stored 30 days; continue with `previous_response_id` or a `conversation`; `background: true` runs it in the background), `GET`/[`DELETE /responses/{id}`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/DELETE/responses/{response_id}), [`POST /responses/{id}/cancel`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/POST/responses/{response_id}/cancel), [`GET /responses/{id}/input_items`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/GET/responses/{response_id}/input_items), [`POST /responses/input_tokens`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/POST/responses/input_tokens), [`POST /responses/compact`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/POST/responses/compact), and a WebSocket at [`GET /responses`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/GET/responses) |\n| Conversations | [`POST /conversations`](https://dyadic.app/developers/api/#dyadic-api/tag/conversations/POST/conversations), `GET`/`POST`/[`DELETE /conversations/{id}`](https://dyadic.app/developers/api/#dyadic-api/tag/conversations/DELETE/conversations/{conversation_id}), `POST`/[`GET /conversations/{id}/items`](https://dyadic.app/developers/api/#dyadic-api/tag/conversations/GET/conversations/{conversation_id}/items), `GET`/[`DELETE /conversations/{id}/items/{item_id}`](https://dyadic.app/developers/api/#dyadic-api/tag/conversations/DELETE/conversations/{conversation_id}/items/{item_id}) |\n| Embeddings | [`POST /embeddings`](https://dyadic.app/developers/api/#dyadic-api/tag/embeddings/POST/embeddings) (`iris-embed`, `iris-embed-large`, `text-embedding-3-small`, `text-embedding-3-large`, `text-embedding-ada-002`) |\n| Audio | [`POST /audio/speech`](https://dyadic.app/developers/api/#dyadic-api/tag/audio/POST/audio/speech), [`POST /audio/transcriptions`](https://dyadic.app/developers/api/#dyadic-api/tag/audio/POST/audio/transcriptions), [`POST /audio/translations`](https://dyadic.app/developers/api/#dyadic-api/tag/audio/POST/audio/translations) |\n| Moderations | [`POST /moderations`](https://dyadic.app/developers/api/#dyadic-api/tag/moderations/POST/moderations) |\n| Web Retrieval | [`POST /web/search`](https://dyadic.app/developers/api/#dyadic-api/tag/web-retrieval/POST/web/search), [`POST /web/read`](https://dyadic.app/developers/api/#dyadic-api/tag/web-retrieval/POST/web/read) (bounded public sources; key Agent Tools permission) |\n| Decisions | [`POST /decisions`](https://dyadic.app/developers/api/#dyadic-api/tag/decisions/POST/decisions) (typed answers: a probability, a choice or a score; OpenAI's beta shape) |\n| Images | [`POST /images/generations`](https://dyadic.app/developers/api/#dyadic-api/tag/images/POST/images/generations), [`POST /images/edits`](https://dyadic.app/developers/api/#dyadic-api/tag/images/POST/images/edits), [`POST /images/variations`](https://dyadic.app/developers/api/#dyadic-api/tag/images/POST/images/variations) |\n| Files | [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files), [`GET /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/GET/files), `GET`/[`DELETE /files/{id}`](https://dyadic.app/developers/api/#dyadic-api/tag/files/DELETE/files/{file_id}), [`GET /files/{id}/content`](https://dyadic.app/developers/api/#dyadic-api/tag/files/GET/files/{file_id}/content) |\n| Batches | [`POST /batches`](https://dyadic.app/developers/api/#dyadic-api/tag/batches/POST/batches), [`GET /batches`](https://dyadic.app/developers/api/#dyadic-api/tag/batches/GET/batches), [`GET /batches/{id}`](https://dyadic.app/developers/api/#dyadic-api/tag/batches/GET/batches/{batch_id}), [`POST /batches/{id}/cancel`](https://dyadic.app/developers/api/#dyadic-api/tag/batches/POST/batches/{batch_id}/cancel) |\n\nRealtime, Assistants, fine-tuning, evals, video, uploads and the other families listed in the\ncontract aren't offered and return `404` with code `unsupported_endpoint`.\n\n## How a request runs\n* With **tools** (function calling), **`response_format`** or **`logprobs`**, or when the key's agent tools are off,\n  the model answers directly with every field you send, streamed token by token, tool-call arguments included.\n* Otherwise Iris may use its own tools (web search, reading pages, and images when the key allows them) before answering.\n* The whole conversation you send is used (up to 1,000 messages and a 16 MB body); the model's context window is the limit.\n\n## Limits\nKeys can cap requests, tokens, credits or spend per day, week, month or ever; a reached cap, or an account out of\ncredits, returns `429` with type `insufficient_quota`. A key takes 60 requests a minute unless it sets its own (up to\n600), and an account 240; 6 requests run at once per key unless it sets its own (up to 32). Past those, `429` with type\n`rate_limit_error` (code `rate_limit_exceeded` or `concurrency_limit`). Every `429` carries `Retry-After`.\n\n## Errors\nErrors use OpenAI's shape: `{\"error\": {\"message\", \"type\", \"param\", \"code\"}}`. A stream that has started reports an\nerror as an event in the stream instead.\n\n## Request ids and limits\nEvery response has an `X-Request-Id`, errors included; send your own `X-Client-Request-Id` (printable ASCII, up to 512\ncharacters) to find a request in your activity log. Both are opaque, not idempotency keys. Responses carry\n`x-ratelimit-limit-requests`, `x-ratelimit-remaining-requests` and `x-ratelimit-reset-requests` for the key's\nrequests per minute, and the `-tokens` set when the key has a token limit.\n\n\n## Hosted tools\n[`POST /responses`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/POST/responses) runs OpenAI's hosted tools on the platform. Each needs a switch on the key (off until you turn it on):\n\n| Tool | Key switch | What it does |\n|---|---|---|\n| `code_interpreter` | Code interpreter | Python 3 (standard library) in an offline container (`container`: a container id, or `{type: \"auto\"}` with `file_ids`, `memory_limit` and `skills`); files at `/mnt/data`; outputs as `code_interpreter_call` items (`include: [\"code_interpreter_call.outputs\"]` for logs), files a run writes cited with `container_file_citation`. A request with `previous_response_id` and no container id reuses the previous response's container while it runs |\n| `shell` | Code interpreter (containers); Function calling (`local`) | Bash in the same kind of container (`environment`: `container_auto`, the default, or `container_reference` with `container_id`; `code_interpreter` and `shell` share one container); `shell_call` and `shell_call_output` items. With `environment: {type: \"local\"}` your app runs the commands on its own machine: the response ends with a `shell_call` (`action.commands`, `timeout_ms`, `max_output_length`), and you send each command's `stdout`, `stderr` and `outcome` (`exit` with `exit_code`, or `timeout`) back as a `shell_call_output` with its `call_id` |\n| `computer` | Function calling | Your app operates a screen (a browser or a VM of its own): the response ends with a `computer_call` whose `actions` (up to 16: `click`, `double_click`, `drag`, `move`, `scroll`, `keypress`, `type`, `wait`, `screenshot`) you run in order, then you send a `computer_call_output` with its `call_id` and a screenshot (`output: {type: \"computer_screenshot\", image_url}`, a data URL or https). `computer_use_preview` gets one `action` per call. Text on the screen is untrusted; confirm consequential steps with the person |\n| `apply_patch` | Function calling | Your app edits its own files: each `apply_patch_call` has one `operation` (`create_file`, `update_file` or `delete_file`, a `path`, and a V4A `diff` except for deletes); apply it and send an `apply_patch_call_output` with its `call_id`, `status` (`completed` or `failed`) and any `output` (an error the model can fix). Check paths stay inside the project |\n| `file_search` | File search | Searches 1 or 2 of your vector stores (`vector_store_ids`; `max_num_results`, `filters`, `ranking_options.score_threshold`); `file_search_call` items (`include: [\"file_search_call.results\"]` for the results), `file_citation` annotations |\n| `image_generation` | Image generation | `image_generation_call` items with the image as base64 in `result` (or a link in `dyadic.url` when the image model returns one) |\n| `mcp` | Remote MCP servers | Tools on a public `https://` MCP server (Streamable HTTP), up to 5 servers a request, each with its own `server_label`; `allowed_tools` limits the tools offered, listed in an `mcp_list_tools` item (`connector_id` isn't supported). Calls need your approval unless `require_approval` is `never` or `{never: {tool_names}}` names the tool: answer an `mcp_approval_request` with an `mcp_approval_response`, the same `mcp` tool and `previous_response_id`. Headers and `authorization` go to the server only and are never stored. |\n\nContainers have no network and 1 GB of memory, expire after 20 minutes without use (`expires_after`, up to 60), hold up to\n64 MB and 1,000 files, and run each program for up to 30 seconds; an account has up to 10 running. Skills (up to 10 a\ncontainer) mount read-only at `/mnt/skills/<name>`. Uploaded files named by `file_id` or `file_ids` (in containers, vector\nstores and these tools) also need the key's Files and Batches switch.\n",
  "contact": {
   "name": "Dyadic",
   "url": "https://api.dyadic.app/"
  },
  "license": {
   "name": "Dyadic terms",
   "url": "https://api.dyadic.app/"
  }
 },
 "servers": [
  {
   "url": "https://api.dyadic.app/openai/v1",
   "description": "Production"
  }
 ],
 "x-dyadic-capabilities": {
  "contract": "openai-compatible-subset",
  "version": "1.2.0",
  "url": "https://api.dyadic.app/openai/v1/capabilities",
  "tested_openai_sdk": {
   "python": "3.26.0"
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ],
 "tags": [
  {
   "name": "Discovery",
   "description": "The models a key may use."
  },
  {
   "name": "Chat",
   "description": "Chat completions: streaming, function calling, images in messages, JSON output."
  },
  {
   "name": "Completions",
   "description": "Legacy text completions (a prompt instead of messages)."
  },
  {
   "name": "Responses",
   "description": "OpenAI's Responses API: stored and background responses, previous_response_id, function calling, web search, input token counts, compaction and a WebSocket mode."
  },
  {
   "name": "Conversations",
   "description": "Conversations: Responses items kept on Dyadic, continued with the conversation parameter."
  },
  {
   "name": "Embeddings",
   "description": "Vector embeddings of text. Needs the key's Embeddings permission."
  },
  {
   "name": "Audio",
   "description": "Speech, transcription and translation. Needs the key's Audio permission."
  },
  {
   "name": "Moderations",
   "description": "Content classification in OpenAI's moderation format. Needs the key's Moderations permission."
  },
  {
   "name": "Decisions",
   "description": "Typed answers to questions about some evidence, in OpenAI's beta shape. Needs the key's Decisions permission."
  },
  {
   "name": "Web Retrieval",
   "description": "Search public sources and read public pages, without a model. Needs the key's Agent Tools permission."
  },
  {
   "name": "Images",
   "description": "Image generation, edits and variations. Needs the key's Image generation permission."
  },
  {
   "name": "Files",
   "description": "Files for batches and for file_id references in messages. Stored in your Workspace. Needs the key's Files permission."
  },
  {
   "name": "Batches",
   "description": "Run many requests in the background from a JSONL file. Needs the key's Files permission."
  },
  {
   "name": "Meta",
   "description": "This description, the compatibility contract and the API index."
  },
  {
   "name": "Containers",
   "description": "Short-lived offline sandboxes for the code_interpreter and shell tools, and their files. Needs the key's Code interpreter switch."
  },
  {
   "name": "Vector stores",
   "description": "Uploaded files, indexed for the file_search tool and for search. Indexing and search are free. Needs the key's File search switch."
  },
  {
   "name": "Skills",
   "description": "Versioned bundles of instructions and scripts that containers mount. Needs the key's Skills switch."
  }
 ],
 "paths": {
  "/models": {
   "get": {
    "tags": [
     "Discovery"
    ],
    "operationId": "listModels",
    "summary": "List models",
    "description": "The models this key may use: its agents, their -think variants when the key allows thinking, and the embedding, speech, transcription and moderation models its Embeddings, Audio and Moderations permissions allow.",
    "responses": {
     "200": {
      "description": "Models",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ModelList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/models/{model}": {
   "get": {
    "tags": [
     "Discovery"
    ],
    "operationId": "retrieveModel",
    "summary": "Retrieve a model",
    "parameters": [
     {
      "name": "model",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "examples": [
        "iris",
        "iris-think",
        "iris-embed",
        "iris-embed-large",
        "text-embedding-3-small",
        "text-embedding-3-large",
        "text-embedding-ada-002",
        "iris-voice",
        "tts-1",
        "tts-1-hd",
        "gpt-4o-mini-tts",
        "gpt-4o-tts",
        "iris-transcribe",
        "whisper-1",
        "gpt-4o-transcribe",
        "gpt-4o-mini-transcribe",
        "whisper-large-v3",
        "whisper-large-v3-turbo",
        "iris-moderation",
        "omni-moderation-latest",
        "omni-moderation-2024-09-26",
        "text-moderation-latest",
        "text-moderation-stable"
       ]
      },
      "description": "A model [`GET /models`](https://dyadic.app/developers/api/#dyadic-api/tag/discovery/GET/models) lists, with or without dyadic/; an OpenAI model name comes back as the agent it runs as, under that name."
     }
    ],
    "responses": {
     "200": {
      "description": "The model",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Model"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/chat/completions": {
   "post": {
    "tags": [
     "Chat"
    ],
    "operationId": "createChatCompletion",
    "summary": "Create a chat completion",
    "description": "OpenAI's chat completions. With `stream: true` the response is `text/event-stream`: a role chunk, content (and `reasoning_content` or `tool_calls`) chunks, a finish chunk, an optional usage chunk, then `data: [DONE]`. Comment lines (`: keep-alive`, the tool Iris is using) keep it open; an error after it opened is a `data: {\"error\": ...}` event before `data: [DONE]`.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ChatCompletionRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The completion (or an event stream when `stream` is true)",
      "headers": {
       "X-Request-Id": {
        "description": "This request's id (on errors too).",
        "schema": {
         "type": "string"
        }
       },
       "X-Dyadic-Ignored-Parameters": {
        "description": "Fields sent that OpenAI doesn't define for the endpoint, so nothing used them.",
        "schema": {
         "type": "string"
        }
       },
       "X-Dyadic-Credits": {
        "description": "Credits the request used (a JSON answer, not a stream).",
        "schema": {
         "type": "number"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletion"
        }
       },
       "text/event-stream": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletionChunk"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "500": {
      "description": "The AI service failed or ended without an answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The AI service failed or ended without an answer.",
          "type": "server_error",
          "param": null,
          "code": "server_error"
         }
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "x-dyadic-fields": [
     "dyadic",
     "frequency_penalty",
     "function_call",
     "functions",
     "logit_bias",
     "logprobs",
     "max_completion_tokens",
     "max_tokens",
     "messages",
     "metadata",
     "min_p",
     "model",
     "parallel_tool_calls",
     "presence_penalty",
     "reasoning",
     "reasoning_effort",
     "repetition_penalty",
     "response_format",
     "safety_identifier",
     "seed",
     "stop",
     "store",
     "stream",
     "stream_options",
     "temperature",
     "tool_choice",
     "tools",
     "top_a",
     "top_k",
     "top_logprobs",
     "top_p",
     "user",
     "verbosity"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "n": [
      1
     ],
     "service_tier": [
      "auto",
      "default"
     ],
     "modalities": [
      "text"
     ]
    },
    "x-dyadic-unsupported-fields": [
     "audio",
     "moderation",
     "prediction",
     "web_search_options"
    ],
    "x-dyadic-accepted-without-effect": [
     "prompt_cache_key",
     "prompt_cache_options",
     "prompt_cache_retention",
     "reasoning.generate_summary",
     "reasoning.summary",
     "stream_options.include_obfuscation"
    ],
    "x-dyadic-tools": [
     "function"
    ]
   },
   "get": {
    "tags": [
     "Chat"
    ],
    "operationId": "listChatCompletions",
    "summary": "List stored chat completions",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletionList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Completions created with store: true, for 30 days.",
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "asc"
      }
     },
     {
      "name": "model",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "The model the request named."
     },
     {
      "name": "metadata",
      "in": "query",
      "style": "deepObject",
      "explode": true,
      "schema": {
       "type": "object",
       "additionalProperties": {
        "type": "string"
       }
      },
      "description": "metadata[key]=value: completions whose metadata has every pair."
     }
    ]
   }
  },
  "/chat/completions/{completion_id}": {
   "parameters": [
    {
     "name": "completion_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A stored chat completion id (chatcmpl-...)."
    }
   ],
   "get": {
    "tags": [
     "Chat"
    ],
    "operationId": "retrieveChatCompletion",
    "summary": "Retrieve a stored chat completion",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletion"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such stored chat completion (they are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such stored chat completion (they are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "completion_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "Chat"
    ],
    "operationId": "updateChatCompletion",
    "summary": "Update a stored chat completion's metadata",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletion"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such stored chat completion (they are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such stored chat completion (they are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "completion_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ConversationUpdate"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "metadata"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "delete": {
    "tags": [
     "Chat"
    ],
    "operationId": "deleteChatCompletion",
    "summary": "Delete a stored chat completion",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletionDeleted"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such stored chat completion (they are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such stored chat completion (they are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "completion_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/chat/completions/{completion_id}/messages": {
   "parameters": [
    {
     "name": "completion_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A stored chat completion id (chatcmpl-...)."
    }
   ],
   "get": {
    "tags": [
     "Chat"
    ],
    "operationId": "listChatCompletionMessages",
    "summary": "List a stored chat completion's messages",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletionMessageList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such stored chat completion (they are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such stored chat completion (they are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "completion_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "asc"
      }
     }
    ]
   }
  },
  "/completions": {
   "post": {
    "tags": [
     "Completions"
    ],
    "operationId": "createCompletion",
    "summary": "Create a text completion",
    "description": "The prompt is answered as one user message, like a chat completion without tools or logprobs. With `stream: true`, `text_completion` chunks, a finish chunk, an optional usage chunk, then `data: [DONE]`.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CompletionRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The completion (or an event stream when `stream` is true)",
      "headers": {
       "X-Request-Id": {
        "description": "This request's id (on errors too).",
        "schema": {
         "type": "string"
        }
       },
       "X-Dyadic-Ignored-Parameters": {
        "description": "Fields sent that OpenAI doesn't define for the endpoint, so nothing used them.",
        "schema": {
         "type": "string"
        }
       },
       "X-Dyadic-Credits": {
        "description": "Credits the request used (a JSON answer, not a stream).",
        "schema": {
         "type": "number"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/TextCompletion"
        }
       },
       "text/event-stream": {
        "schema": {
         "$ref": "#/components/schemas/TextCompletion"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "500": {
      "description": "The AI service failed or ended without an answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The AI service failed or ended without an answer.",
          "type": "server_error",
          "param": null,
          "code": "server_error"
         }
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "x-dyadic-fields": [
     "dyadic",
     "frequency_penalty",
     "logit_bias",
     "max_completion_tokens",
     "max_tokens",
     "min_p",
     "model",
     "presence_penalty",
     "prompt",
     "reasoning",
     "reasoning_effort",
     "repetition_penalty",
     "response_format",
     "seed",
     "stop",
     "stream",
     "stream_options",
     "temperature",
     "top_a",
     "top_k",
     "top_p",
     "user"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "n": [
      1
     ],
     "best_of": [
      1
     ],
     "echo": [
      false
     ],
     "logprobs": [
      false
     ],
     "suffix": [
      ""
     ]
    },
    "x-dyadic-accepted-without-effect": [
     "reasoning.generate_summary",
     "reasoning.summary",
     "stream_options.include_obfuscation"
    ]
   }
  },
  "/responses": {
   "post": {
    "tags": [
     "Responses"
    ],
    "operationId": "createResponse",
    "summary": "Create a response",
    "responses": {
     "200": {
      "description": "The response (or an event stream when `stream` is true)",
      "headers": {
       "X-Request-Id": {
        "description": "This request's id (on errors too).",
        "schema": {
         "type": "string"
        }
       },
       "X-Dyadic-Ignored-Parameters": {
        "description": "Fields sent that OpenAI doesn't define for the endpoint, so nothing used them.",
        "schema": {
         "type": "string"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Response"
        }
       },
       "text/event-stream": {
        "schema": {
         "$ref": "#/components/schemas/ResponseStreamEvent"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model, previous response or conversation.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model, previous response or conversation.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "500": {
      "description": "The AI service failed or ended without an answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The AI service failed or ended without an answer.",
          "type": "server_error",
          "param": null,
          "code": "server_error"
         }
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "description": "OpenAI's Responses API on Iris. Function tools come back as `function_call` output items; send `function_call_output` items (with previous_response_id, a conversation or the full input) to continue. A stream is `event:` and `data:` frames from `response.created` to `response.completed` or `response.incomplete` (no `[DONE]`); an error after it opened ends it with `response.failed`.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ResponseRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "background",
     "conversation",
     "dyadic",
     "input",
     "instructions",
     "max_output_tokens",
     "metadata",
     "model",
     "parallel_tool_calls",
     "previous_response_id",
     "reasoning",
     "safety_identifier",
     "store",
     "stream",
     "stream_options",
     "temperature",
     "text",
     "tool_choice",
     "tools",
     "top_logprobs",
     "top_p",
     "user"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "include": [
      "message.output_text.logprobs",
      "message.input_image.image_url",
      "reasoning.encrypted_content",
      "code_interpreter_call.outputs",
      "file_search_call.results"
     ],
     "service_tier": [
      "auto",
      "default"
     ],
     "truncation": [
      "disabled"
     ]
    },
    "x-dyadic-unsupported-fields": [
     "access_programs",
     "context_management",
     "max_tool_calls",
     "moderation",
     "prompt"
    ],
    "x-dyadic-accepted-without-effect": [
     "prompt_cache_key",
     "prompt_cache_options",
     "prompt_cache_retention",
     "reasoning.generate_summary",
     "reasoning.summary",
     "stream_options.include_obfuscation"
    ],
    "x-dyadic-tools": [
     "function",
     "custom",
     "namespace",
     "tool_search",
     "web_search",
     "web_search_preview",
     "web_search_2025_08_26",
     "web_search_preview_2025_03_11",
     "code_interpreter",
     "shell",
     "file_search",
     "image_generation",
     "mcp",
     "computer",
     "computer_use_preview",
     "apply_patch"
    ]
   },
   "get": {
    "tags": [
     "Responses"
    ],
    "operationId": "connectResponses",
    "summary": "Open a Responses WebSocket",
    "description": "With `Upgrade: websocket`: send `response.create` events (the POST body without stream; a `stream_id` you add comes back on its events), receive the same events as the SSE stream, one response at a time, each limited, billed and logged like a POST. Errors come as `{type: error, status, error}`. Background and `response.steer` aren't offered here. Up to 60 minutes and 8 sockets per account; a key revoked or paused meanwhile closes the socket.",
    "responses": {
     "101": {
      "description": "Switching to WebSocket"
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "405": {
      "description": "Not a WebSocket upgrade.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Not a WebSocket upgrade.",
          "type": "invalid_request_error",
          "param": null,
          "code": "method_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/responses/{response_id}": {
   "parameters": [
    {
     "name": "response_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A stored response id (resp_...)."
    }
   ],
   "get": {
    "tags": [
     "Responses"
    ],
    "operationId": "retrieveResponse",
    "summary": "Retrieve a response",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Response"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such response (responses are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such response (responses are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "response_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "stream",
      "in": "query",
      "schema": {
       "type": "boolean",
       "enum": [
        false
       ]
      },
      "description": "Streaming a stored response isn't offered: true is a 400 unsupported_parameter."
     }
    ]
   },
   "delete": {
    "tags": [
     "Responses"
    ],
    "operationId": "deleteResponse",
    "summary": "Delete a response",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ResponseDeleted"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such response (responses are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such response (responses are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "response_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "A background response still running is stopped first."
   }
  },
  "/responses/{response_id}/input_items": {
   "parameters": [
    {
     "name": "response_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A stored response id (resp_...)."
    }
   ],
   "get": {
    "tags": [
     "Responses"
    ],
    "operationId": "listInputItems",
    "summary": "List a response's input items",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InputItemList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such response (responses are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such response (responses are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "response_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     }
    ]
   }
  },
  "/responses/{response_id}/cancel": {
   "parameters": [
    {
     "name": "response_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A stored response id (resp_...)."
    }
   ],
   "post": {
    "tags": [
     "Responses"
    ],
    "operationId": "cancelResponse",
    "summary": "Cancel a response",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Response"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such response (responses are kept 30 days) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such response (responses are kept 30 days) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "response_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Stops a queued or running background response; it comes back with status cancelled, no output and no usage. Nothing more runs; you pay only for what already ran. A cancelled one is returned as it is; a foreground or finished response returns 400 `response_not_cancellable`."
   }
  },
  "/responses/input_tokens": {
   "post": {
    "tags": [
     "Responses"
    ],
    "operationId": "countInputTokens",
    "summary": "Count a response's input tokens",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InputTokens"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model, previous response or conversation.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model, previous response or conversation.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "An estimate (about four bytes of text per token, a fixed amount per image and message, and the agent's own instructions when the key answers as the agent). Free: no model runs.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/InputTokensRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "conversation",
     "input",
     "instructions",
     "model",
     "parallel_tool_calls",
     "previous_response_id",
     "reasoning",
     "text",
     "tool_choice",
     "tools"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "truncation": [
      "disabled"
     ]
    },
    "x-dyadic-unsupported-fields": [
     "personality"
    ],
    "x-dyadic-tools": [
     "function",
     "custom",
     "namespace",
     "tool_search",
     "web_search",
     "web_search_preview",
     "web_search_2025_08_26",
     "web_search_preview_2025_03_11",
     "code_interpreter",
     "shell",
     "file_search",
     "image_generation",
     "mcp",
     "computer",
     "computer_use_preview",
     "apply_patch"
    ]
   }
  },
  "/responses/compact": {
   "post": {
    "tags": [
     "Responses"
    ],
    "operationId": "compactResponse",
    "summary": "Compact a conversation",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Compaction"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model, previous response or conversation.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model, previous response or conversation.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "500": {
      "description": "The AI service failed or ended without an answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The AI service failed or ended without an answer.",
          "type": "server_error",
          "param": null,
          "code": "server_error"
         }
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     },
     "503": {
      "description": "Compaction isn't available right now.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Compaction isn't available right now.",
          "type": "server_error",
          "param": null,
          "code": "unavailable"
         }
        }
       }
      }
     }
    },
    "description": "Summarizes everything but your own messages into one compaction item (sealed: only this API, for your account, can read it). Send the output as the next request's input. Billed like a short response.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CompactRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "input",
     "instructions",
     "model",
     "previous_response_id"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "service_tier": [
      "auto",
      "default"
     ]
    },
    "x-dyadic-accepted-without-effect": [
     "prompt_cache_key",
     "prompt_cache_options",
     "prompt_cache_retention"
    ]
   }
  },
  "/conversations": {
   "post": {
    "tags": [
     "Conversations"
    ],
    "operationId": "createConversation",
    "summary": "Create a conversation",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Conversation"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Up to 20 items to start with. A conversation holds up to 5,000 items of up to 8 MB each, and an account's conversations 512 MB (past those, 400 `conversation_full`). They don't expire.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ConversationRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "items",
     "metadata"
    ],
    "x-dyadic-unsupported-fields-error": true
   }
  },
  "/conversations/{conversation_id}": {
   "parameters": [
    {
     "name": "conversation_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A conversation id (conv_...)."
    }
   ],
   "get": {
    "tags": [
     "Conversations"
    ],
    "operationId": "retrieveConversation",
    "summary": "Retrieve a conversation",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Conversation"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such conversation for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such conversation for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "conversation_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "Conversations"
    ],
    "operationId": "updateConversation",
    "summary": "Update a conversation's metadata",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Conversation"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such conversation for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such conversation for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "conversation_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ConversationUpdate"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "metadata"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "delete": {
    "tags": [
     "Conversations"
    ],
    "operationId": "deleteConversation",
    "summary": "Delete a conversation and its items",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ConversationDeleted"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such conversation for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such conversation for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "conversation_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/conversations/{conversation_id}/items": {
   "parameters": [
    {
     "name": "conversation_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A conversation id (conv_...)."
    }
   ],
   "post": {
    "tags": [
     "Conversations"
    ],
    "operationId": "createConversationItems",
    "summary": "Add items",
    "responses": {
     "200": {
      "description": "The items as stored",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ConversationItemList"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such conversation for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such conversation for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "conversation_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ConversationItems"
       }
      }
     }
    },
    "parameters": [
     {
      "name": "include",
      "in": "query",
      "schema": {
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "message.output_text.logprobs",
         "message.input_image.image_url"
        ]
       }
      },
      "description": "Any other value is a 400 unsupported_parameter."
     }
    ],
    "x-dyadic-fields": [
     "items"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "get": {
    "tags": [
     "Conversations"
    ],
    "operationId": "listConversationItems",
    "summary": "List items",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ConversationItemList"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such conversation for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such conversation for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "conversation_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     },
     {
      "name": "include",
      "in": "query",
      "schema": {
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "message.output_text.logprobs",
         "message.input_image.image_url"
        ]
       }
      },
      "description": "Any other value is a 400 unsupported_parameter."
     }
    ]
   }
  },
  "/conversations/{conversation_id}/items/{item_id}": {
   "parameters": [
    {
     "name": "conversation_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A conversation id (conv_...)."
    },
    {
     "name": "item_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "An item id."
    }
   ],
   "get": {
    "tags": [
     "Conversations"
    ],
    "operationId": "retrieveConversationItem",
    "summary": "Retrieve an item",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ConversationItem"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such conversation or item for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such conversation or item for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "item_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "include",
      "in": "query",
      "schema": {
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "message.output_text.logprobs",
         "message.input_image.image_url"
        ]
       }
      },
      "description": "Any other value is a 400 unsupported_parameter."
     }
    ]
   },
   "delete": {
    "tags": [
     "Conversations"
    ],
    "operationId": "deleteConversationItem",
    "summary": "Delete an item",
    "responses": {
     "200": {
      "description": "The conversation",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Conversation"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such conversation or item for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such conversation or item for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "item_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/embeddings": {
   "post": {
    "tags": [
     "Embeddings"
    ],
    "operationId": "createEmbedding",
    "summary": "Create embeddings",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/EmbeddingList"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/EmbeddingRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "dimensions",
     "encoding_format",
     "input",
     "model",
     "user"
    ],
    "x-dyadic-unsupported-fields-error": true
   }
  },
  "/audio/speech": {
   "post": {
    "tags": [
     "Audio"
    ],
    "operationId": "createSpeech",
    "summary": "Create speech",
    "responses": {
     "200": {
      "description": "The audio",
      "content": {
       "audio/mpeg": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       },
       "audio/wav": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       },
       "audio/pcm": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "description": "Text to speech. OpenAI's voice names map onto the speech model's voices.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SpeechRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "input",
     "model",
     "response_format",
     "speed",
     "voice"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "stream_format": [
      "audio"
     ]
    },
    "x-dyadic-unsupported-fields": [
     "instructions"
    ]
   }
  },
  "/audio/transcriptions": {
   "post": {
    "tags": [
     "Audio"
    ],
    "operationId": "createTranscription",
    "summary": "Transcribe audio",
    "responses": {
     "200": {
      "description": "The text (JSON, or plain text for text, srt and vtt)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Transcription"
        }
       },
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/TranscriptionRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "file",
     "language",
     "model",
     "prompt",
     "response_format",
     "temperature",
     "timestamp_granularities"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "stream": [
      false
     ]
    },
    "x-dyadic-unsupported-fields": [
     "chunking_strategy",
     "include",
     "known_speaker_names",
     "known_speaker_references"
    ]
   }
  },
  "/audio/translations": {
   "post": {
    "tags": [
     "Audio"
    ],
    "operationId": "createTranslation",
    "summary": "Translate audio into English",
    "responses": {
     "200": {
      "description": "The text (JSON, or plain text for text, srt and vtt)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Transcription"
        }
       },
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/TranslationRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "file",
     "model",
     "prompt",
     "response_format",
     "temperature"
    ],
    "x-dyadic-unsupported-fields-error": true
   }
  },
  "/moderations": {
   "post": {
    "tags": [
     "Moderations"
    ],
    "operationId": "createModeration",
    "summary": "Classify content",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Moderation"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ModerationRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "input",
     "model"
    ],
    "x-dyadic-unsupported-fields-error": true
   }
  },
  "/decisions": {
   "post": {
    "tags": [
     "Decisions"
    ],
    "operationId": "createDecision",
    "summary": "Typed answers to questions",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Decision"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "description": "Up to 32 questions about the same evidence in one request. Billed at the provider's cost.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/DecisionRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "input",
     "model",
     "questions"
    ],
    "x-dyadic-unsupported-fields-error": true
   }
  },
  "/images/generations": {
   "post": {
    "tags": [
     "Images"
    ],
    "operationId": "createImage",
    "summary": "Generate an image",
    "description": "One image per request, returned as base64 (or a URL when the model returns one). Library storage is best-effort and obeys the selected permission policy. The response reports whether it was saved; a storage refusal never repeats generation. A prompt moderation refuses is a 400 `content_flagged`.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ImageRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The image",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImageResponse"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "409": {
      "description": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
          "type": "invalid_request_error",
          "param": null,
          "code": "permission_approval_required"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "x-dyadic-fields": [
     "dyadic",
     "prompt",
     "quality",
     "size",
     "user"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "n": [
      1
     ],
     "background": [
      "auto"
     ],
     "moderation": [
      "auto"
     ],
     "partial_images": [
      0
     ],
     "stream": [
      false
     ]
    },
    "x-dyadic-unsupported-fields": [
     "output_compression",
     "output_format",
     "style"
    ],
    "x-dyadic-accepted-without-effect": [
     "model",
     "response_format"
    ]
   }
  },
  "/images/edits": {
   "post": {
    "tags": [
     "Images"
    ],
    "operationId": "createImageEdit",
    "summary": "Edit an image",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImageResponse"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "409": {
      "description": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
          "type": "invalid_request_error",
          "param": null,
          "code": "permission_approval_required"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "description": "Changes an image as the prompt describes (masks aren't supported). Library storage is best-effort and follows the selected permissions; its status is returned with the generated image.",
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/ImageEditRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "dyadic",
     "image",
     "prompt",
     "quality",
     "size",
     "user"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "n": [
      1
     ],
     "background": [
      "auto"
     ],
     "partial_images": [
      0
     ],
     "stream": [
      false
     ]
    },
    "x-dyadic-unsupported-fields": [
     "input_fidelity",
     "mask",
     "output_compression",
     "output_format"
    ],
    "x-dyadic-accepted-without-effect": [
     "model",
     "response_format"
    ]
   }
  },
  "/images/variations": {
   "post": {
    "tags": [
     "Images"
    ],
    "operationId": "createImageVariation",
    "summary": "Create an image variation",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImageResponse"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "409": {
      "description": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
          "type": "invalid_request_error",
          "param": null,
          "code": "permission_approval_required"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "description": "The same subject, style and composition, freshly drawn.",
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/ImageVariationRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "dyadic",
     "image",
     "size",
     "user"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "n": [
      1
     ]
    },
    "x-dyadic-accepted-without-effect": [
     "model",
     "response_format"
    ]
   }
  },
  "/files": {
   "post": {
    "tags": [
     "Files"
    ],
    "operationId": "createFile",
    "summary": "Upload a file",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/File"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/FileUploadRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "file",
     "purpose"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-unsupported-fields": [
     "expires_after"
    ]
   },
   "get": {
    "tags": [
     "Files"
    ],
    "operationId": "listFiles",
    "summary": "List files",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/FileList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "purpose",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 10000,
       "default": 100
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     }
    ]
   }
  },
  "/files/{file_id}": {
   "parameters": [
    {
     "name": "file_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A file id (file-...)."
    }
   ],
   "get": {
    "tags": [
     "Files"
    ],
    "operationId": "retrieveFile",
    "summary": "Retrieve a file",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/File"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (only files uploaded through the API and batch outputs) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such file (only files uploaded through the API and batch outputs) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "file_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Files"
    ],
    "operationId": "deleteFile",
    "summary": "Delete a file",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/FileDeleted"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (only files uploaded through the API and batch outputs) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such file (only files uploaded through the API and batch outputs) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "file_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/files/{file_id}/content": {
   "parameters": [
    {
     "name": "file_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A file id (file-...)."
    }
   ],
   "get": {
    "tags": [
     "Files"
    ],
    "operationId": "downloadFile",
    "summary": "Download a file",
    "responses": {
     "200": {
      "description": "The file's bytes as an attachment: a passive type (a PDF, an image, a document) as itself, anything else (HTML, SVG, XML, programs) as application/octet-stream",
      "content": {
       "application/octet-stream": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       },
       "*/*": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (only files uploaded through the API and batch outputs) for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such file (only files uploaded through the API and batch outputs) for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "file_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/batches": {
   "post": {
    "tags": [
     "Batches"
    ],
    "operationId": "createBatch",
    "summary": "Create a batch",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Batch"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such input file for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such input file for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "file_not_found"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Each line runs like a live request (the same limits, credits and activity log), one at a time, within 24 hours. Results go to the output file; failed lines to the error file. An input file with problems makes a batch with status failed and its errors. Up to 4 unfinished batches per account (then 429 `too_many_open_batches`).",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/BatchRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "completion_window",
     "endpoint",
     "input_file_id",
     "metadata"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-unsupported-fields": [
     "output_expires_after"
    ]
   },
   "get": {
    "tags": [
     "Batches"
    ],
    "operationId": "listBatches",
    "summary": "List batches",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/BatchList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     }
    ],
    "description": "Newest first."
   }
  },
  "/batches/{batch_id}": {
   "parameters": [
    {
     "name": "batch_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A batch id (batch_...)."
    }
   ],
   "get": {
    "tags": [
     "Batches"
    ],
    "operationId": "retrieveBatch",
    "summary": "Retrieve a batch",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Batch"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such batch for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such batch for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "batch_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/batches/{batch_id}/cancel": {
   "parameters": [
    {
     "name": "batch_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A batch id (batch_...)."
    }
   ],
   "post": {
    "tags": [
     "Batches"
    ],
    "operationId": "cancelBatch",
    "summary": "Cancel a batch",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Batch"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "No such batch for this key's account.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "No such batch for this key's account.",
          "type": "invalid_request_error",
          "param": null,
          "code": "batch_not_found"
         }
        }
       }
      }
     },
     "409": {
      "description": "This batch has finished or is already cancelling.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "This batch has finished or is already cancelling.",
          "type": "invalid_request_error",
          "param": null,
          "code": "batch_not_cancellable"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "A validating or in-progress batch moves to cancelling, then cancelled, with what finished in its output file."
   }
  },
  "/capabilities": {
   "get": {
    "tags": [
     "Meta"
    ],
    "operationId": "getCapabilities",
    "summary": "The compatibility contract",
    "security": [],
    "description": "Per endpoint: the fields applied, fields limited to some values, OpenAI fields refused with unsupported_parameter, fields accepted without effect, tools, and the tested OpenAI SDK versions.",
    "responses": {
     "200": {
      "description": "The contract",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/openapi.json": {
   "get": {
    "tags": [
     "Meta"
    ],
    "operationId": "getOpenAPI",
    "summary": "This OpenAPI description",
    "security": [],
    "responses": {
     "200": {
      "description": "OpenAPI 3.1 JSON",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Too many requests from this address.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Too many requests from this address.",
          "type": "rate_limit_error",
          "param": null,
          "code": "rate_limit_exceeded"
         }
        }
       }
      }
     }
    }
   }
  },
  "/web/search": {
   "post": {
    "tags": [
     "Web Retrieval"
    ],
    "operationId": "searchPublicWeb",
    "summary": "Search Public Sources",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PublicWebResult"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "409": {
      "description": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
          "type": "invalid_request_error",
          "param": null,
          "code": "permission_approval_required"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "description": "Uses the same SearXNG, shared index, public-only fetcher and key limits as agent tools. No paid engine or inference. Pages enter the shared index asynchronously only when public, retained with consent and allowed by robots.txt. A failed optional lookup does not invalidate previously retrieved evidence. A field not listed here is a 400.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PublicWebSearch"
       }
      }
     }
    }
   }
  },
  "/web/read": {
   "post": {
    "tags": [
     "Web Retrieval"
    ],
    "operationId": "readPublicWeb",
    "summary": "Read a Public Page",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PublicWebResult"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "409": {
      "description": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The selected permission policy requires an owner approval; this noninteractive request cannot wait for a card.",
          "type": "invalid_request_error",
          "param": null,
          "code": "permission_approval_required"
         }
        }
       }
      }
     },
     "413": {
      "description": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The body is too large: 16 MB of JSON, or the endpoint's upload limit.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     },
     "415": {
      "description": "Send the body as application/json (multipart/form-data for uploads).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Send the body as application/json (multipart/form-data for uploads).",
          "type": "invalid_request_error",
          "param": null,
          "code": null
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "502": {
      "description": "The model provider failed to answer.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The model provider failed to answer.",
          "type": "server_error",
          "param": null,
          "code": "upstream_error"
         }
        }
       }
      }
     }
    },
    "description": "Uses the same SearXNG, shared index, public-only fetcher and key limits as agent tools. No paid engine or inference. Pages enter the shared index asynchronously only when public, retained with consent and allowed by robots.txt. A failed optional lookup does not invalidate previously retrieved evidence. A field not listed here is a 400.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PublicWebRead"
       }
      }
     }
    }
   }
  },
  "/containers": {
   "post": {
    "tags": [
     "Containers"
    ],
    "operationId": "createContainer",
    "summary": "Create a container",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Container"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "An account has up to 10 running containers; at the limit this is refused (400). `skills` need the key's Skills switch.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ContainerRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "expires_after",
     "file_ids",
     "name",
     "skills"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-limited-fields": {
     "memory_limit": [
      "1g"
     ],
     "network_policy": [
      {
       "type": "disabled"
      }
     ]
    }
   },
   "get": {
    "tags": [
     "Containers"
    ],
    "operationId": "listContainers",
    "summary": "List containers",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ContainerList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     }
    ]
   }
  },
  "/containers/{container_id}": {
   "parameters": [
    {
     "name": "container_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A container id (cntr_...)."
    }
   ],
   "get": {
    "tags": [
     "Containers"
    ],
    "operationId": "retrieveContainer",
    "summary": "Retrieve a container",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Container"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Containers"
    ],
    "operationId": "deleteContainer",
    "summary": "Delete a container",
    "responses": {
     "200": {
      "description": "Deleted",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "object": {
           "const": "container.deleted"
          },
          "deleted": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/containers/{container_id}/files": {
   "parameters": [
    {
     "name": "container_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A container id (cntr_...)."
    }
   ],
   "post": {
    "tags": [
     "Containers"
    ],
    "operationId": "createContainerFile",
    "summary": "Add a file to a container",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ContainerFile"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "413": {
      "description": "The upload is larger than 20 MB.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The upload is larger than 20 MB.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     }
    },
    "description": "Multipart `file`, or JSON `{\"file_id\"}` to copy a file uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files). A file at the same path is replaced; a container holds up to 64 MB and 1,000 files.",
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/ContainerFileUpload"
       }
      },
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ContainerFileUpload"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "file",
     "file_id"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "get": {
    "tags": [
     "Containers"
    ],
    "operationId": "listContainerFiles",
    "summary": "List a container's files",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ContainerFileList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     }
    ]
   }
  },
  "/containers/{container_id}/files/{file_id}": {
   "parameters": [
    {
     "name": "container_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A container id (cntr_...)."
    },
    {
     "name": "file_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A container file id (cfile_...)."
    }
   ],
   "get": {
    "tags": [
     "Containers"
    ],
    "operationId": "retrieveContainerFile",
    "summary": "Retrieve a container file",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ContainerFile"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Containers"
    ],
    "operationId": "deleteContainerFile",
    "summary": "Delete a container file",
    "responses": {
     "200": {
      "description": "Deleted",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "object": {
           "const": "container.file.deleted"
          },
          "deleted": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/containers/{container_id}/files/{file_id}/content": {
   "parameters": [
    {
     "name": "container_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A container id (cntr_...)."
    },
    {
     "name": "file_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A container file id (cfile_...)."
    }
   ],
   "get": {
    "tags": [
     "Containers"
    ],
    "operationId": "retrieveContainerFileContent",
    "summary": "Download a container file",
    "responses": {
     "200": {
      "description": "The file's bytes",
      "content": {
       "application/octet-stream": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/vector_stores": {
   "post": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "createVectorStore",
    "summary": "Create a vector store",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStore"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "An account keeps up to 100 vector stores. Reads, chunks and embeds each file with Dyadic's own model (free): text, Markdown, CSV, JSON, HTML, XML, YAML, code, PDF (with a text layer) or Word (.docx). The reply waits up to 8 seconds; then poll the file until it is completed or failed.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "chunking_strategy",
     "expires_after",
     "file_ids",
     "metadata",
     "name"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "get": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "listVectorStores",
    "summary": "List vector stores",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     }
    ]
   }
  },
  "/vector_stores/{vector_store_id}": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    }
   ],
   "get": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "retrieveVectorStore",
    "summary": "Retrieve a vector store",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStore"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "modifyVectorStore",
    "summary": "Modify a vector store",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStore"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreUpdateRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "expires_after",
     "metadata",
     "name"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "delete": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "deleteVectorStore",
    "summary": "Delete a vector store",
    "responses": {
     "200": {
      "description": "Deleted",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "object": {
           "const": "vector_store.deleted"
          },
          "deleted": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/vector_stores/{vector_store_id}/search": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    }
   ],
   "post": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "searchVectorStore",
    "summary": "Search a vector store",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreSearchResults"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Embeds the query with Dyadic's own model (free) and ranks the completed files' chunks by similarity, after attribute filters.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreSearchRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "filters",
     "max_num_results",
     "query",
     "ranking_options"
    ],
    "x-dyadic-unsupported-fields-error": true,
    "x-dyadic-unsupported-fields": [
     "ranking_options.hybrid_search"
    ],
    "x-dyadic-accepted-without-effect": [
     "ranking_options.ranker",
     "rewrite_query"
    ]
   }
  },
  "/vector_stores/{vector_store_id}/files": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    }
   ],
   "post": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "createVectorStoreFile",
    "summary": "Add a file",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFile"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Reads, chunks and embeds each file with Dyadic's own model (free): text, Markdown, CSV, JSON, HTML, XML, YAML, code, PDF (with a text layer) or Word (.docx). The reply waits up to 8 seconds; then poll the file until it is completed or failed. A file that can't be read fails (last_error). A store holds up to 500 files; a text file the account's 500 MB search index can't take is refused (400). Adding a file again indexes it again.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreFileRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "attributes",
     "chunking_strategy",
     "file_id"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "get": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "listVectorStoreFiles",
    "summary": "List a store's files",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFileList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     },
     {
      "name": "filter",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "in_progress",
        "completed",
        "failed",
        "cancelled"
       ]
      }
     }
    ]
   }
  },
  "/vector_stores/{vector_store_id}/files/{file_id}": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    },
    {
     "name": "file_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A file id (file-...)."
    }
   ],
   "get": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "retrieveVectorStoreFile",
    "summary": "Retrieve a store file",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFile"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "updateVectorStoreFile",
    "summary": "Update a file's attributes",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFile"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreFileUpdateRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "attributes"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "delete": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "deleteVectorStoreFile",
    "summary": "Remove a file from the store",
    "responses": {
     "200": {
      "description": "Removed",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "object": {
           "const": "vector_store.file.deleted"
          },
          "deleted": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Its chunks go too; the uploaded file itself stays."
   }
  },
  "/vector_stores/{vector_store_id}/files/{file_id}/content": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    },
    {
     "name": "file_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A file id (file-...)."
    }
   ],
   "get": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "retrieveVectorStoreFileContent",
    "summary": "A file's text, as indexed",
    "responses": {
     "200": {
      "description": "Its chunks, in order",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFileContent"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/vector_stores/{vector_store_id}/file_batches": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    }
   ],
   "post": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "createVectorStoreFileBatch",
    "summary": "Add files in a batch",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFileBatch"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Reads, chunks and embeds each file with Dyadic's own model (free): text, Markdown, CSV, JSON, HTML, XML, YAML, code, PDF (with a text layer) or Word (.docx). The reply waits up to 8 seconds; then poll the file until it is completed or failed. All or none: if any file can't be added (not one of your API uploads, invalid attributes or chunking_strategy, or more than the store's 500 files or the search index can take), the batch is refused (400) and no file is added.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreFileBatchRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "attributes",
     "chunking_strategy",
     "file_ids",
     "files"
    ],
    "x-dyadic-unsupported-fields-error": true
   }
  },
  "/vector_stores/{vector_store_id}/file_batches/{batch_id}": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    },
    {
     "name": "batch_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A file batch id (vsfb_...)."
    }
   ],
   "get": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "retrieveVectorStoreFileBatch",
    "summary": "Retrieve a file batch",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFileBatch"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    },
    {
     "name": "batch_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A file batch id (vsfb_...)."
    }
   ],
   "post": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "cancelVectorStoreFileBatch",
    "summary": "Cancel a file batch",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFileBatch"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Its files still in progress are marked cancelled."
   }
  },
  "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files": {
   "parameters": [
    {
     "name": "vector_store_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A vector store id (vs_...)."
    },
    {
     "name": "batch_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A file batch id (vsfb_...)."
    }
   ],
   "get": {
    "tags": [
     "Vector stores"
    ],
    "operationId": "listVectorStoreFileBatchFiles",
    "summary": "List a batch's files",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VectorStoreFileList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     }
    ]
   }
  },
  "/skills": {
   "post": {
    "tags": [
     "Skills"
    ],
    "operationId": "createSkill",
    "summary": "Upload a skill",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Skill"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "413": {
      "description": "The upload is larger than 50 MB.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The upload is larger than 50 MB.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     }
    },
    "description": "An account keeps up to 100 skills.",
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/SkillUpload"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "files"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "get": {
    "tags": [
     "Skills"
    ],
    "operationId": "listSkills",
    "summary": "List skills",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SkillList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     },
     {
      "name": "order",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "asc",
        "desc"
       ],
       "default": "desc"
      }
     }
    ]
   }
  },
  "/skills/{skill_id}": {
   "parameters": [
    {
     "name": "skill_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A skill id (skill_...)."
    }
   ],
   "get": {
    "tags": [
     "Skills"
    ],
    "operationId": "retrieveSkill",
    "summary": "Retrieve a skill",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Skill"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "Skills"
    ],
    "operationId": "updateSkill",
    "summary": "Choose the default version",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Skill"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SkillDefaultRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "default_version"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "delete": {
    "tags": [
     "Skills"
    ],
    "operationId": "deleteSkill",
    "summary": "Delete a skill",
    "responses": {
     "200": {
      "description": "Deleted",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "object": {
           "const": "skill.deleted"
          },
          "deleted": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Its versions go too, and the Workspace and the account's agents stop using it."
   }
  },
  "/skills/{skill_id}/content": {
   "parameters": [
    {
     "name": "skill_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A skill id (skill_...)."
    }
   ],
   "get": {
    "tags": [
     "Skills"
    ],
    "operationId": "retrieveSkillContent",
    "summary": "Download the default version",
    "responses": {
     "200": {
      "description": "The default version's files as a zip",
      "content": {
       "application/zip": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  },
  "/skills/{skill_id}/versions": {
   "parameters": [
    {
     "name": "skill_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A skill id (skill_...)."
    }
   ],
   "post": {
    "tags": [
     "Skills"
    ],
    "operationId": "createSkillVersion",
    "summary": "Upload a new version",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SkillVersion"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "413": {
      "description": "The upload is larger than 50 MB.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The upload is larger than 50 MB.",
          "type": "invalid_request_error",
          "param": null,
          "code": "request_too_large"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/SkillVersionUpload"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "default",
     "files"
    ],
    "x-dyadic-unsupported-fields-error": true
   },
   "get": {
    "tags": [
     "Skills"
    ],
    "operationId": "listSkillVersions",
    "summary": "List versions",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SkillVersionList"
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "Every version, newest first, in one page."
   }
  },
  "/skills/{skill_id}/versions/{version}": {
   "parameters": [
    {
     "name": "skill_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A skill id (skill_...)."
    },
    {
     "name": "version",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A version number, latest or default."
    }
   ],
   "get": {
    "tags": [
     "Skills"
    ],
    "operationId": "retrieveSkillVersion",
    "summary": "Retrieve a version",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SkillVersion"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Skills"
    ],
    "operationId": "deleteSkillVersion",
    "summary": "Delete a version",
    "responses": {
     "200": {
      "description": "Deleted",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string",
           "example": "skill_...@2"
          },
          "object": {
           "const": "skill.version.deleted"
          },
          "skill_id": {
           "type": "string"
          },
          "version": {
           "type": "string"
          },
          "deleted": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    },
    "description": "The default version can't be deleted (400): choose another default first."
   }
  },
  "/skills/{skill_id}/versions/{version}/content": {
   "parameters": [
    {
     "name": "skill_id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A skill id (skill_...)."
    },
    {
     "name": "version",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string"
     },
     "description": "A version number, latest or default."
    }
   ],
   "get": {
    "tags": [
     "Skills"
    ],
    "operationId": "retrieveSkillVersionContent",
    "summary": "Download a version",
    "responses": {
     "200": {
      "description": "The version's files as a zip",
      "content": {
       "application/zip": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The request is invalid.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_request"
         }
        }
       }
      }
     },
     "401": {
      "description": "The API key is missing, wrong, revoked or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The API key is missing, wrong, revoked or expired.",
          "type": "invalid_request_error",
          "param": null,
          "code": "invalid_api_key"
         }
        }
       }
      }
     },
     "403": {
      "description": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "The key may not do this (paused, account not active, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown model or endpoint.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "Unknown model or endpoint.",
          "type": "invalid_request_error",
          "param": null,
          "code": "model_not_found"
         }
        }
       }
      }
     },
     "429": {
      "description": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "message": "A rate, concurrency or usage limit was reached, or the account is out of credits.",
          "type": "insufficient_quota",
          "param": null,
          "code": "insufficient_quota"
         }
        }
       }
      },
      "headers": {
       "Retry-After": {
        "description": "Seconds to wait (20).",
        "schema": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearerAuth": {
    "type": "http",
    "scheme": "bearer",
    "bearerFormat": "dya-...",
    "description": "A Dyadic API key from app.dyadic.app/developers/keys."
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "object",
      "properties": {
       "message": {
        "type": "string"
       },
       "type": {
        "type": "string"
       },
       "param": {
        "type": [
         "string",
         "null"
        ]
       },
       "code": {
        "type": [
         "string",
         "null"
        ]
       }
      }
     }
    }
   },
   "Model": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "examples": [
       "iris",
       "iris-think",
       "iris-embed",
       "iris-embed-large",
       "text-embedding-3-small",
       "text-embedding-3-large",
       "text-embedding-ada-002",
       "iris-voice",
       "tts-1",
       "tts-1-hd",
       "gpt-4o-mini-tts",
       "gpt-4o-tts",
       "iris-transcribe",
       "whisper-1",
       "gpt-4o-transcribe",
       "gpt-4o-mini-transcribe",
       "whisper-large-v3",
       "whisper-large-v3-turbo",
       "iris-moderation",
       "omni-moderation-latest",
       "omni-moderation-2024-09-26",
       "text-moderation-latest",
       "text-moderation-stable"
      ]
     },
     "object": {
      "const": "model"
     },
     "created": {
      "type": "integer"
     },
     "owned_by": {
      "const": "dyadic"
     },
     "name": {
      "type": "string"
     },
     "description": {
      "type": "string"
     }
    }
   },
   "ModelList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Model"
      }
     }
    }
   },
   "ContentPart": {
    "oneOf": [
     {
      "type": "object",
      "required": [
       "type",
       "text"
      ],
      "properties": {
       "type": {
        "type": "string",
        "enum": [
         "text",
         "input_text"
        ]
       },
       "text": {
        "type": "string"
       }
      }
     },
     {
      "type": "object",
      "required": [
       "type",
       "image_url"
      ],
      "properties": {
       "type": {
        "const": "image_url"
       },
       "image_url": {
        "oneOf": [
         {
          "type": "object",
          "required": [
           "url"
          ],
          "properties": {
           "url": {
            "type": "string",
            "description": "An https URL or a data:image/... URL."
           },
           "detail": {
            "type": "string",
            "enum": [
             "auto",
             "low",
             "high"
            ]
           }
          }
         },
         {
          "type": "string",
          "description": "The URL itself."
         }
        ]
       }
      }
     },
     {
      "type": "object",
      "required": [
       "type",
       "file"
      ],
      "properties": {
       "type": {
        "const": "file"
       },
       "file": {
        "type": "object",
        "properties": {
         "file_id": {
          "type": "string",
          "description": "A file uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files) (needs the key's Files permission): an image, PDF, text or audio file."
         },
         "filename": {
          "type": "string"
         },
         "file_data": {
          "type": "string",
          "description": "A data: URL."
         },
         "file_url": {
          "type": "string",
          "description": "An https URL."
         }
        },
        "description": "One of file_id, file_data or file_url."
       }
      }
     },
     {
      "type": "object",
      "required": [
       "type",
       "input_audio"
      ],
      "properties": {
       "type": {
        "const": "input_audio"
       },
       "input_audio": {
        "type": "object",
        "required": [
         "data",
         "format"
        ],
        "properties": {
         "data": {
          "type": "string",
          "description": "Base64 audio."
         },
         "format": {
          "type": "string",
          "enum": [
           "wav",
           "mp3",
           "flac",
           "m4a",
           "ogg",
           "webm",
           "aac"
          ]
         }
        }
       }
      }
     }
    ]
   },
   "ChatMessage": {
    "type": "object",
    "required": [
     "role"
    ],
    "properties": {
     "role": {
      "type": "string",
      "enum": [
       "system",
       "developer",
       "user",
       "assistant",
       "tool",
       "function"
      ],
      "description": "developer is read as system; a legacy function result is sent as a user turn."
     },
     "content": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ContentPart"
        },
        "maxItems": 200
       },
       {
        "type": "null"
       }
      ]
     },
     "name": {
      "type": "string",
      "description": "Kept on system, user and assistant messages when it is 1 to 64 of a-z, A-Z, 0-9, _ . : -; dropped otherwise."
     },
     "tool_calls": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ToolCall"
      }
     },
     "tool_call_id": {
      "type": "string",
      "description": "Required on tool messages."
     }
    }
   },
   "Tool": {
    "type": "object",
    "required": [
     "type",
     "function"
    ],
    "properties": {
     "type": {
      "const": "function"
     },
     "function": {
      "type": "object",
      "required": [
       "name"
      ],
      "properties": {
       "name": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_-]{1,64}$"
       },
       "description": {
        "type": "string"
       },
       "parameters": {
        "type": "object"
       },
       "strict": {
        "type": "boolean"
       }
      }
     }
    }
   },
   "ToolCall": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "type": {
      "const": "function"
     },
     "function": {
      "type": "object",
      "properties": {
       "name": {
        "type": "string"
       },
       "arguments": {
        "type": "string",
        "description": "JSON text."
       }
      }
     }
    }
   },
   "ResponseFormat": {
    "type": "object",
    "required": [
     "type"
    ],
    "properties": {
     "type": {
      "type": "string",
      "enum": [
       "text",
       "json_object",
       "json_schema"
      ]
     },
     "json_schema": {
      "type": "object",
      "properties": {
       "name": {
        "type": "string"
       },
       "schema": {
        "type": "object"
       },
       "strict": {
        "type": "boolean"
       }
      }
     }
    }
   },
   "ChatCompletionRequest": {
    "type": "object",
    "required": [
     "model",
     "messages"
    ],
    "properties": {
     "model": {
      "type": "string",
      "examples": [
       "iris",
       "iris-think"
      ],
      "description": "iris or iris-think (see Models: OpenAI model names run as iris). Unknown: 404 model_not_found."
     },
     "messages": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ChatMessage"
      },
      "minItems": 1,
      "maxItems": 1000,
      "description": "The whole conversation: up to 1,000 messages and 4 million characters."
     },
     "tools": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Tool"
      },
      "maxItems": 2048,
      "description": "Functions the model may call. Needs the key's Function calling permission."
     },
     "tool_choice": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none",
         "required"
        ]
       },
       {
        "type": "object"
       }
      ],
      "description": "auto, none, required, {type: function, function: {name}} naming one of tools, or {type: allowed_tools, allowed_tools: {mode: auto or required}}."
     },
     "parallel_tool_calls": {
      "type": "boolean"
     },
     "response_format": {
      "$ref": "#/components/schemas/ResponseFormat"
     },
     "logprobs": {
      "type": "boolean"
     },
     "top_logprobs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 20
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "functions": {
      "type": "array",
      "items": {
       "type": "object"
      },
      "description": "Legacy function tools (used when tools is absent)."
     },
     "function_call": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none"
        ]
       },
       {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         }
        }
       }
      ],
      "description": "Legacy tool_choice."
     },
     "reasoning": {
      "type": "object",
      "properties": {
       "effort": {
        "type": "string",
        "enum": [
         "none",
         "minimal",
         "low",
         "medium",
         "high",
         "xhigh"
        ],
        "description": "How much the model may think before answering, on models that support it."
       },
       "context": {
        "type": "string",
        "enum": [
         "auto",
         "current_turn",
         "all_turns"
        ]
       },
       "summary": {
        "type": "string"
       },
       "generate_summary": {
        "type": "string"
       }
      },
      "additionalProperties": false
     },
     "store": {
      "type": "boolean",
      "default": false,
      "description": "Keep the completion for 30 days: list, retrieve, update and delete it."
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "propertyNames": {
       "minLength": 1,
       "maxLength": 64
      },
      "maxProperties": 16,
      "description": "Up to 16 string keys (1 to 64 characters) and string values (up to 512)."
     },
     "safety_identifier": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     },
     "service_tier": {
      "type": "string",
      "enum": [
       "auto",
       "default"
      ]
     },
     "modalities": {
      "type": "array",
      "items": {
       "type": "string",
       "enum": [
        "text"
       ]
      }
     },
     "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2,
      "default": 0.7,
      "description": "Sampling temperature."
     },
     "top_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Nucleus sampling."
     },
     "top_k": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000,
      "description": "Sample from the top K tokens (supported by many open models)."
     },
     "min_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "top_a": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "presence_penalty": {
      "type": "number",
      "minimum": -2,
      "maximum": 2
     },
     "frequency_penalty": {
      "type": "number",
      "minimum": -2,
      "maximum": 2
     },
     "repetition_penalty": {
      "type": "number",
      "minimum": 0,
      "maximum": 2
     },
     "seed": {
      "type": "integer",
      "description": "Best-effort deterministic sampling."
     },
     "logit_bias": {
      "type": "object",
      "additionalProperties": {
       "type": "number",
       "minimum": -100,
       "maximum": 100
      },
      "propertyNames": {
       "pattern": "^-?[0-9]+$"
      },
      "maxProperties": 300,
      "description": "Token ID to bias (-100 to 100), up to 300 entries."
     },
     "max_tokens": {
      "type": "integer",
      "minimum": 1,
      "default": 4096,
      "description": "Output token cap; more than 32000 (or the key's own cap) is lowered to it."
     },
     "max_completion_tokens": {
      "type": "integer",
      "minimum": 1,
      "description": "Alias of max_tokens; wins when both are sent."
     },
     "stop": {
      "oneOf": [
       {
        "type": "string",
        "maxLength": 200
       },
       {
        "type": "array",
        "items": {
         "type": "string",
         "maxLength": 200
        },
        "maxItems": 4
       }
      ]
     },
     "stream": {
      "type": "boolean",
      "default": false,
      "description": "Stream Server-Sent Events, ending with `data: [DONE]`."
     },
     "stream_options": {
      "type": "object",
      "properties": {
       "include_usage": {
        "type": "boolean"
       },
       "include_obfuscation": {
        "type": "boolean"
       }
      },
      "additionalProperties": false,
      "description": "With include_usage, a last chunk carries usage and credits. include_obfuscation is accepted and adds nothing."
     },
     "reasoning_effort": {
      "type": "string",
      "enum": [
       "none",
       "minimal",
       "low",
       "medium",
       "high",
       "xhigh"
      ],
      "description": "How much the model may think before answering, on models that support it."
     },
     "user": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     },
     "dyadic": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "approval_mode": {
        "type": "string",
        "enum": [
         "ask",
         "edits",
         "auto",
         "bypass",
         "autonomous",
         "custom"
        ],
        "default": "ask"
       },
       "permission_profile_id": {
        "type": "string",
        "format": "uuid",
        "description": "Owned saved profile. Requires Custom; omission uses the account selection."
       },
       "pog": {
        "oneOf": [
         {
          "type": "boolean"
         },
         {
          "type": "object"
         }
        ],
        "description": "Optional Predictive Operation Graph (POG) configuration to accelerate multi-step tool orchestration inside this OpenAI-compatible turn. For full standalone POG DAGs (intent compilation, $future dependencies, live edits, SSE streams, and EvidencePackage), use the Dyadic Platform API (/v1/pog)."
       }
      }
     },
     "verbosity": {
      "type": "string",
      "enum": [
       "low",
       "medium",
       "high"
      ]
     }
    },
    "example": {
     "model": "iris",
     "messages": [
      {
       "role": "system",
       "content": "Be concise."
      },
      {
       "role": "user",
       "content": "Summarize today's tech news in three bullets."
      }
     ],
     "temperature": 0.4,
     "stream": false
    }
   },
   "BillingInfo": {
    "type": "object",
    "description": "Dyadic extension: credits and the log id.",
    "properties": {
     "credits": {
      "type": "number",
      "description": "Credits this request used."
     },
     "credits_final": {
      "type": "boolean",
      "description": "False while the charge is a reserved estimate."
     },
     "request_id": {
      "type": "string"
     },
     "log_id": {
      "type": "string",
      "description": "Its row in your activity log."
     },
     "permissions": {
      "type": "object",
      "properties": {
       "requested_mode": {
        "type": "string"
       },
       "effective_mode": {
        "type": "string"
       },
       "profile_id": {
        "type": "string",
        "format": "uuid"
       },
       "snapshot_id": {
        "type": "string",
        "format": "uuid"
       }
      }
     },
     "pog": {
      "type": "object",
      "description": "Predictive Operation Graph summary and metrics when POG ran."
     }
    }
   },
   "Usage": {
    "type": "object",
    "properties": {
     "prompt_tokens": {
      "type": "integer"
     },
     "completion_tokens": {
      "type": "integer"
     },
     "total_tokens": {
      "type": "integer"
     },
     "dyadic": {
      "$ref": "#/components/schemas/BillingInfo"
     }
    }
   },
   "ChatCompletion": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "chat.completion"
     },
     "created": {
      "type": "integer"
     },
     "model": {
      "type": "string",
      "description": "The model the request named."
     },
     "system_fingerprint": {
      "type": "null"
     },
     "service_tier": {
      "const": "default",
      "description": "On a stored completion."
     },
     "metadata": {
      "type": "object",
      "description": "On a stored completion."
     },
     "choices": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "index": {
         "type": "integer"
        },
        "finish_reason": {
         "type": "string",
         "enum": [
          "stop",
          "length",
          "tool_calls",
          "content_filter"
         ]
        },
        "logprobs": {
         "type": [
          "object",
          "null"
         ]
        },
        "message": {
         "type": "object",
         "properties": {
          "role": {
           "const": "assistant"
          },
          "content": {
           "type": [
            "string",
            "null"
           ]
          },
          "reasoning_content": {
           "type": "string"
          },
          "refusal": {
           "type": "null"
          },
          "tool_calls": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/ToolCall"
           }
          }
         }
        }
       }
      }
     },
     "usage": {
      "$ref": "#/components/schemas/Usage"
     },
     "dyadic": {
      "$ref": "#/components/schemas/BillingInfo"
     }
    },
    "example": {
     "id": "chatcmpl-123",
     "object": "chat.completion",
     "created": 1759536000,
     "model": "iris",
     "choices": [
      {
       "index": 0,
       "message": {
        "role": "assistant",
        "content": "Here are three bullets...",
        "refusal": null
       },
       "logprobs": null,
       "finish_reason": "stop"
      }
     ],
     "usage": {
      "prompt_tokens": 42,
      "completion_tokens": 88,
      "total_tokens": 130
     },
     "dyadic": {
      "credits": 3.2,
      "credits_final": false,
      "request_id": "abc",
      "log_id": "f1c..."
     }
    }
   },
   "ChatCompletionChunk": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "chat.completion.chunk"
     },
     "created": {
      "type": "integer"
     },
     "model": {
      "type": "string"
     },
     "system_fingerprint": {
      "type": "null"
     },
     "dyadic": {
      "$ref": "#/components/schemas/BillingInfo",
      "description": "On the finish chunk when a permission selection other than ask applied."
     },
     "choices": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "index": {
         "type": "integer"
        },
        "finish_reason": {
         "type": [
          "string",
          "null"
         ]
        },
        "logprobs": {
         "type": [
          "object",
          "null"
         ]
        },
        "delta": {
         "type": "object",
         "properties": {
          "role": {
           "type": "string"
          },
          "content": {
           "type": "string"
          },
          "reasoning_content": {
           "type": "string"
          },
          "tool_calls": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "integer"
             },
             "id": {
              "type": "string"
             },
             "type": {
              "const": "function"
             },
             "function": {
              "type": "object",
              "properties": {
               "name": {
                "type": "string"
               },
               "arguments": {
                "type": "string"
               }
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "usage": {
      "$ref": "#/components/schemas/Usage"
     }
    }
   },
   "CompletionRequest": {
    "type": "object",
    "required": [
     "model",
     "prompt"
    ],
    "properties": {
     "model": {
      "type": "string",
      "examples": [
       "iris",
       "iris-think"
      ],
      "description": "iris or iris-think (see Models: OpenAI model names run as iris). Unknown: 404 model_not_found."
     },
     "prompt": {
      "oneOf": [
       {
        "type": "string",
        "minLength": 1
       },
       {
        "type": "array",
        "items": {
         "type": "string",
         "minLength": 1
        },
        "minItems": 1,
        "maxItems": 1
       }
      ],
      "description": "One prompt: a string or a one-item list."
     },
     "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2,
      "default": 0.7,
      "description": "Sampling temperature."
     },
     "top_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Nucleus sampling."
     },
     "top_k": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000,
      "description": "Sample from the top K tokens (supported by many open models)."
     },
     "min_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "top_a": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "presence_penalty": {
      "type": "number",
      "minimum": -2,
      "maximum": 2
     },
     "frequency_penalty": {
      "type": "number",
      "minimum": -2,
      "maximum": 2
     },
     "repetition_penalty": {
      "type": "number",
      "minimum": 0,
      "maximum": 2
     },
     "seed": {
      "type": "integer",
      "description": "Best-effort deterministic sampling."
     },
     "logit_bias": {
      "type": "object",
      "additionalProperties": {
       "type": "number",
       "minimum": -100,
       "maximum": 100
      },
      "propertyNames": {
       "pattern": "^-?[0-9]+$"
      },
      "maxProperties": 300,
      "description": "Token ID to bias (-100 to 100), up to 300 entries."
     },
     "max_tokens": {
      "type": "integer",
      "minimum": 1,
      "default": 4096,
      "description": "Output token cap; more than 32000 (or the key's own cap) is lowered to it."
     },
     "max_completion_tokens": {
      "type": "integer",
      "minimum": 1,
      "description": "Alias of max_tokens; wins when both are sent."
     },
     "stop": {
      "oneOf": [
       {
        "type": "string",
        "maxLength": 200
       },
       {
        "type": "array",
        "items": {
         "type": "string",
         "maxLength": 200
        },
        "maxItems": 4
       }
      ]
     },
     "stream": {
      "type": "boolean",
      "default": false,
      "description": "Stream Server-Sent Events, ending with `data: [DONE]`."
     },
     "stream_options": {
      "type": "object",
      "properties": {
       "include_usage": {
        "type": "boolean"
       },
       "include_obfuscation": {
        "type": "boolean"
       }
      },
      "additionalProperties": false,
      "description": "With include_usage, a last chunk carries usage and credits. include_obfuscation is accepted and adds nothing."
     },
     "reasoning_effort": {
      "type": "string",
      "enum": [
       "none",
       "minimal",
       "low",
       "medium",
       "high",
       "xhigh"
      ],
      "description": "How much the model may think before answering, on models that support it."
     },
     "user": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "best_of": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "echo": {
      "type": "boolean",
      "enum": [
       false
      ]
     },
     "logprobs": {
      "enum": [
       false,
       null
      ],
      "description": "Legacy logprobs aren't returned."
     },
     "suffix": {
      "type": "string",
      "enum": [
       ""
      ],
      "description": "Insertion isn't offered."
     },
     "dyadic": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "approval_mode": {
        "type": "string",
        "enum": [
         "ask",
         "edits",
         "auto",
         "bypass",
         "autonomous",
         "custom"
        ],
        "default": "ask"
       },
       "permission_profile_id": {
        "type": "string",
        "format": "uuid",
        "description": "Owned saved profile. Requires Custom; omission uses the account selection."
       },
       "pog": {
        "oneOf": [
         {
          "type": "boolean"
         },
         {
          "type": "object"
         }
        ],
        "description": "Optional Predictive Operation Graph (POG) configuration to accelerate multi-step tool orchestration inside this OpenAI-compatible turn. For full standalone POG DAGs (intent compilation, $future dependencies, live edits, SSE streams, and EvidencePackage), use the Dyadic Platform API (/v1/pog)."
       }
      }
     },
     "reasoning": {
      "type": "object",
      "properties": {
       "effort": {
        "type": "string",
        "enum": [
         "none",
         "minimal",
         "low",
         "medium",
         "high",
         "xhigh"
        ],
        "description": "How much the model may think before answering, on models that support it."
       },
       "context": {
        "type": "string",
        "enum": [
         "auto",
         "current_turn",
         "all_turns"
        ]
       },
       "summary": {
        "type": "string"
       },
       "generate_summary": {
        "type": "string"
       }
      },
      "additionalProperties": false
     },
     "response_format": {
      "$ref": "#/components/schemas/ResponseFormat"
     }
    },
    "example": {
     "model": "iris",
     "prompt": "Write a two-line poem about Fridays.",
     "max_tokens": 80
    }
   },
   "TextCompletion": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "text_completion"
     },
     "created": {
      "type": "integer"
     },
     "model": {
      "type": "string"
     },
     "choices": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "text": {
         "type": "string"
        },
        "index": {
         "type": "integer"
        },
        "finish_reason": {
         "type": [
          "string",
          "null"
         ]
        },
        "logprobs": {
         "type": [
          "object",
          "null"
         ]
        }
       }
      }
     },
     "usage": {
      "$ref": "#/components/schemas/Usage"
     },
     "dyadic": {
      "$ref": "#/components/schemas/BillingInfo"
     }
    }
   },
   "ImageRequest": {
    "type": "object",
    "required": [
     "prompt"
    ],
    "properties": {
     "prompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
     },
     "model": {
      "type": "string",
      "description": "Accepted without effect: Dyadic's image model draws every image."
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "size": {
      "type": "string",
      "example": "1024x1024",
      "description": "WIDTHxHEIGHT. Its ratio sets the aspect when it is 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 or 2:3; another size is drawn at the model's default aspect."
     },
     "quality": {
      "type": "string",
      "enum": [
       "standard",
       "hd",
       "high",
       "max"
      ],
      "description": "hd and high ask for high quality, max for the most."
     },
     "response_format": {
      "type": "string",
      "enum": [
       "b64_json",
       "url"
      ],
      "description": "Accepted without effect: b64_json, or url when the model returns a link."
     },
     "background": {
      "type": "string",
      "enum": [
       "auto"
      ]
     },
     "moderation": {
      "type": "string",
      "enum": [
       "auto"
      ]
     },
     "partial_images": {
      "type": "integer",
      "enum": [
       0
      ]
     },
     "stream": {
      "type": "boolean",
      "enum": [
       false
      ]
     },
     "dyadic": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "approval_mode": {
        "type": "string",
        "enum": [
         "ask",
         "edits",
         "auto",
         "bypass",
         "autonomous",
         "custom"
        ],
        "default": "ask"
       },
       "permission_profile_id": {
        "type": "string",
        "format": "uuid",
        "description": "Owned saved profile. Requires Custom; omission uses the account selection."
       }
      }
     },
     "user": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     }
    },
    "example": {
     "prompt": "A neon city at dusk, isometric",
     "size": "1024x1024",
     "quality": "standard"
    }
   },
   "ImageResponse": {
    "type": "object",
    "properties": {
     "created": {
      "type": "integer"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "b64_json": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "revised_prompt": {
         "type": "string"
        }
       }
      }
     },
     "dyadic": {
      "type": "object",
      "properties": {
       "permissions": {
        "type": "object",
        "properties": {
         "requested_mode": {
          "type": "string"
         },
         "effective_mode": {
          "type": "string"
         },
         "profile_id": {
          "type": "string",
          "format": "uuid"
         },
         "snapshot_id": {
          "type": "string",
          "format": "uuid"
         }
        }
       },
       "storage": {
        "type": "object",
        "required": [
         "status"
        ],
        "properties": {
         "status": {
          "type": "string",
          "enum": [
           "saved",
           "not_saved",
           "external_url"
          ]
         },
         "file_id": {
          "type": "string",
          "format": "uuid"
         },
         "reason_code": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   },
   "ResponseRequest": {
    "type": "object",
    "required": [
     "model"
    ],
    "properties": {
     "model": {
      "type": "string",
      "examples": [
       "iris",
       "iris-think"
      ],
      "description": "iris or iris-think (see Models: OpenAI model names run as iris). Unknown: 404 model_not_found."
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ResponseInputItem"
        }
       }
      ],
      "description": "Text or input items. Omitted, this turn is an empty user message."
     },
     "instructions": {
      "type": "string",
      "description": "A system message for this response only (not carried by previous_response_id)."
     },
     "previous_response_id": {
      "type": "string",
      "description": "Continue from a stored response (up to 100 back): its input and output come first. Unknown: 404 previous_response_not_found."
     },
     "store": {
      "type": "boolean",
      "default": true,
      "description": "Keep the response for 30 days (needed for previous_response_id)."
     },
     "stream": {
      "type": "boolean",
      "default": false,
      "description": "Stream Responses events (response.created ... response.completed)."
     },
     "tools": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string",
         "enum": [
          "function",
          "custom",
          "namespace",
          "tool_search",
          "web_search",
          "web_search_preview",
          "web_search_2025_08_26",
          "web_search_preview_2025_03_11",
          "code_interpreter",
          "shell",
          "file_search",
          "image_generation",
          "mcp",
          "computer",
          "computer_use_preview",
          "apply_patch"
         ],
         "description": "Supported tool kinds; local shell, computer and apply_patch execute in the client application, subject to its authorization."
        },
        "name": {
         "type": "string"
        },
        "description": {
         "type": "string"
        },
        "parameters": {
         "type": "object"
        },
        "strict": {
         "type": "boolean"
        },
        "format": {
         "type": "object",
         "description": "custom: {type: grammar, syntax, definition}, added to the tool's description."
        },
        "tools": {
         "type": "array",
         "items": {
          "type": "object"
         },
         "description": "namespace: its function and custom tools."
        },
        "execution": {
         "type": "string",
         "description": "tool_search: client offers your app's tool search to the model."
        },
        "container": {
         "description": "code_interpreter: a container id, or {type: auto} to make one ({type: container_reference, container_id} names one).",
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "object",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "auto",
              "container_reference"
             ]
            },
            "container_id": {
             "type": "string"
            },
            "file_ids": {
             "type": "array",
             "items": {
              "type": "string"
             },
             "maxItems": 50,
             "description": "Files uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files), copied in."
            },
            "memory_limit": {
             "type": "string",
             "enum": [
              "1g"
             ],
             "default": "1g"
            },
            "network_policy": {
             "type": "object",
             "properties": {
              "type": {
               "const": "disabled"
              }
             },
             "description": "Containers have no network: only {type: disabled}."
            },
            "skills": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/SkillReference"
             },
             "maxItems": 10
            }
           }
          }
         ]
        },
        "environment": {
         "description": "shell: container_auto (the default) makes a container, container_reference names one, local runs the commands in your app. A string: a container id (shell), or computer_use_preview's environment name (not used).",
         "oneOf": [
          {
           "type": "object",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "container_auto",
              "container_reference",
              "local"
             ]
            },
            "container_id": {
             "type": "string"
            },
            "file_ids": {
             "type": "array",
             "items": {
              "type": "string"
             },
             "maxItems": 50,
             "description": "Files uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files), copied in."
            },
            "memory_limit": {
             "type": "string",
             "enum": [
              "1g"
             ],
             "default": "1g"
            },
            "network_policy": {
             "type": "object",
             "properties": {
              "type": {
               "const": "disabled"
              }
             },
             "description": "Containers have no network: only {type: disabled}."
            },
            "skills": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/SkillReference"
             },
             "maxItems": 10
            }
           }
          },
          {
           "type": "string"
          }
         ]
        },
        "vector_store_ids": {
         "type": "array",
         "items": {
          "type": "string"
         },
         "minItems": 1,
         "maxItems": 2,
         "description": "file_search: required."
        },
        "max_num_results": {
         "type": "integer",
         "minimum": 1,
         "maximum": 50,
         "default": 10
        },
        "filters": {
         "$ref": "#/components/schemas/VectorStoreFilter"
        },
        "ranking_options": {
         "type": "object",
         "properties": {
          "score_threshold": {
           "type": "number",
           "minimum": 0,
           "maximum": 1,
           "default": 0
          }
         }
        },
        "server_label": {
         "type": "string",
         "pattern": "^[A-Za-z0-9_-]{1,64}$"
        },
        "server_url": {
         "type": "string",
         "format": "uri",
         "description": "A public https:// address on the standard port (no IP address or credentials)."
        },
        "server_description": {
         "type": "string",
         "description": "Shown to the model (up to 500 characters)."
        },
        "headers": {
         "type": "object",
         "maxProperties": 20,
         "additionalProperties": {
          "type": "string",
          "maxLength": 8192
         }
        },
        "authorization": {
         "type": "string",
         "maxLength": 8192,
         "description": "Sent as Authorization: Bearer <token>, or as given when it starts with Bearer or Basic."
        },
        "allowed_tools": {
         "oneOf": [
          {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          {
           "type": "object",
           "properties": {
            "tool_names": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          }
         ]
        },
        "require_approval": {
         "oneOf": [
          {
           "type": "string",
           "enum": [
            "always",
            "never"
           ]
          },
          {
           "type": "object",
           "properties": {
            "always": {
             "type": "object",
             "properties": {
              "tool_names": {
               "type": "array",
               "items": {
                "type": "string"
               }
              }
             }
            },
            "never": {
             "type": "object",
             "properties": {
              "tool_names": {
               "type": "array",
               "items": {
                "type": "string"
               }
              }
             }
            }
           }
          }
         ],
         "default": "always",
         "description": "An object skips approval only for a tool named under never and not under always."
        },
        "display_width": {
         "type": "integer",
         "minimum": 1,
         "description": "Accepted, not used: coordinates are pixels in your latest screenshot."
        },
        "display_height": {
         "type": "integer",
         "minimum": 1,
         "description": "Accepted, not used."
        }
       }
      },
      "description": "Web search needs the key's Agent Tools permission."
     },
     "tool_choice": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none",
         "required"
        ]
       },
       {
        "type": "object"
       }
      ],
      "description": "auto, none, required, {type: function or custom, name}, {type: allowed_tools, mode: auto or required}, {type: shell, computer, apply_patch or tool_search}; web search or a hosted tool counts as auto."
     },
     "parallel_tool_calls": {
      "type": "boolean"
     },
     "text": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "format": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "enum": [
           "text",
           "json_object",
           "json_schema"
          ]
         },
         "name": {
          "type": "string"
         },
         "schema": {
          "type": "object"
         },
         "strict": {
          "type": "boolean"
         }
        }
       },
       "verbosity": {
        "type": "string",
        "enum": [
         "low",
         "medium",
         "high"
        ],
        "description": "How long the answer should be."
       }
      }
     },
     "reasoning": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "effort": {
        "type": "string",
        "enum": [
         "none",
         "minimal",
         "low",
         "medium",
         "high",
         "xhigh"
        ],
        "description": "How much the model may think before answering, on models that support it."
       },
       "context": {
        "type": "string",
        "enum": [
         "auto",
         "current_turn",
         "all_turns"
        ]
       },
       "summary": {
        "type": "string",
        "description": "Accepted without effect."
       },
       "generate_summary": {
        "type": "string",
        "description": "As summary."
       }
      }
     },
     "max_output_tokens": {
      "type": "integer",
      "minimum": 1,
      "description": "Output token cap; more than 32000 (or the key's own cap) is lowered to it."
     },
     "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2,
      "default": 0.7,
      "description": "Sampling temperature."
     },
     "top_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Nucleus sampling."
     },
     "top_logprobs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 20,
      "description": "With include message.output_text.logprobs."
     },
     "include": {
      "type": "array",
      "items": {
       "type": "string",
       "enum": [
        "message.output_text.logprobs",
        "message.input_image.image_url",
        "reasoning.encrypted_content",
        "code_interpreter_call.outputs",
        "file_search_call.results"
       ]
      },
      "description": "reasoning.encrypted_content is accepted and adds nothing: reasoning comes back as summary text."
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "propertyNames": {
       "minLength": 1,
       "maxLength": 64
      },
      "maxProperties": 16,
      "description": "Up to 16 string keys (1 to 64 characters) and string values (up to 512)."
     },
     "user": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     },
     "safety_identifier": {
      "type": "string"
     },
     "conversation": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         }
        }
       }
      ],
      "description": "A conversation (conv_...): its items come first, and this response's input and output are added to it. Not with previous_response_id. Unknown: 404 conversation_not_found; full: 400 conversation_full."
     },
     "background": {
      "type": "boolean",
      "default": false,
      "description": "Answer at once with status queued and run in the background: poll [`GET /responses/{id}`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/GET/responses/{response_id}), cancel with [`POST /responses/{id}/cancel`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/POST/responses/{response_id}/cancel). Not with stream or store: false."
     },
     "service_tier": {
      "type": "string",
      "enum": [
       "auto",
       "default"
      ]
     },
     "truncation": {
      "type": "string",
      "enum": [
       "disabled"
      ]
     },
     "dyadic": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "approval_mode": {
        "type": "string",
        "enum": [
         "ask",
         "edits",
         "auto",
         "bypass",
         "autonomous",
         "custom"
        ],
        "default": "ask"
       },
       "permission_profile_id": {
        "type": "string",
        "format": "uuid",
        "description": "Owned saved profile. Requires Custom; omission uses the account selection."
       },
       "pog": {
        "oneOf": [
         {
          "type": "boolean"
         },
         {
          "type": "object"
         }
        ],
        "description": "Optional Predictive Operation Graph (POG) configuration to accelerate multi-step tool orchestration inside this OpenAI-compatible turn. For full standalone POG DAGs (intent compilation, $future dependencies, live edits, SSE streams, and EvidencePackage), use the Dyadic Platform API (/v1/pog)."
       },
       "plan_mode": {
        "type": "boolean"
       },
       "plan_id": {
        "type": "string",
        "format": "uuid"
       },
       "conversation": {
        "type": "string",
        "maxLength": 200
       }
      }
     },
     "stream_options": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "include_obfuscation": {
        "type": "boolean",
        "description": "Accepted compatibility option; no effect on Dyadic events."
       }
      }
     }
    },
    "example": {
     "model": "iris",
     "instructions": "Be concise.",
     "input": "What changed in AI this week?"
    }
   },
   "ResponseInputItem": {
    "type": "object",
    "description": "A message ({role, content}), a function, custom or tool search call or its output, or a compaction item; reasoning, item_reference and web_search_call items are skipped.",
    "properties": {
     "type": {
      "type": "string",
      "enum": [
       "message",
       "function_call",
       "function_call_output",
       "custom_tool_call",
       "custom_tool_call_output",
       "tool_search_call",
       "tool_search_output",
       "compaction",
       "additional_tools",
       "reasoning",
       "item_reference",
       "web_search_call",
       "mcp_approval_response",
       "shell_call",
       "shell_call_output",
       "computer_call",
       "computer_call_output",
       "apply_patch_call",
       "apply_patch_call_output"
      ]
     },
     "id": {
      "type": "string"
     },
     "role": {
      "type": "string",
      "enum": [
       "user",
       "assistant",
       "system",
       "developer"
      ]
     },
     "content": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string",
           "enum": [
            "input_text",
            "input_image",
            "input_file",
            "output_text",
            "text",
            "summary_text",
            "refusal"
           ]
          },
          "text": {
           "type": "string"
          },
          "refusal": {
           "type": "string"
          },
          "image_url": {
           "oneOf": [
            {
             "type": "string"
            },
            {
             "type": "object",
             "properties": {
              "url": {
               "type": "string"
              }
             }
            }
           ]
          },
          "detail": {
           "type": "string",
           "enum": [
            "auto",
            "low",
            "high"
           ]
          },
          "file_id": {
           "type": "string",
           "description": "A file uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files)."
          },
          "file_data": {
           "type": "string"
          },
          "file_url": {
           "type": "string"
          },
          "filename": {
           "type": "string"
          }
         }
        }
       }
      ]
     },
     "call_id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "namespace": {
      "type": "string"
     },
     "arguments": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "object"
       }
      ]
     },
     "input": {
      "type": "string",
      "description": "custom_tool_call: its input text."
     },
     "output": {
      "description": "Tool result: string, shell result array, or computer screenshot object.",
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "object"
       },
       {
        "type": "array",
        "items": {
         "type": "object"
        }
       }
      ]
     },
     "encrypted_content": {
      "type": "string",
      "description": "compaction: from [`POST /responses/compact`](https://dyadic.app/developers/api/#dyadic-api/tag/responses/POST/responses/compact)."
     },
     "tools": {
      "type": "array",
      "items": {
       "type": "object"
      },
      "description": "additional_tools and tool_search_output: the tools."
     },
     "execution": {
      "type": "string"
     },
     "approval_request_id": {
      "type": "string"
     },
     "approve": {
      "type": "boolean"
     },
     "status": {
      "type": "string",
      "enum": [
       "completed",
       "failed"
      ]
     },
     "current_url": {
      "type": "string",
      "description": "computer_call_output."
     }
    }
   },
   "Response": {
    "type": "object",
    "description": "Settings echo what ran: the applied temperature and output cap, one service tier, no truncation and no tool call limit.",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "response"
     },
     "created_at": {
      "type": "integer"
     },
     "status": {
      "type": "string",
      "enum": [
       "queued",
       "in_progress",
       "completed",
       "incomplete",
       "failed",
       "cancelled"
      ]
     },
     "model": {
      "type": "string"
     },
     "background": {
      "type": "boolean"
     },
     "conversation": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "id": {
        "type": "string"
       }
      }
     },
     "output": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string",
         "enum": [
          "message",
          "function_call",
          "reasoning",
          "custom_tool_call",
          "tool_search_call",
          "code_interpreter_call",
          "shell_call",
          "shell_call_output",
          "file_search_call",
          "image_generation_call",
          "mcp_list_tools",
          "mcp_call",
          "mcp_approval_request",
          "computer_call",
          "apply_patch_call"
         ]
        },
        "id": {
         "type": "string"
        },
        "role": {
         "type": "string"
        },
        "content": {
         "type": "array",
         "items": {
          "type": "object"
         }
        },
        "call_id": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "namespace": {
         "type": "string"
        },
        "arguments": {
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "object"
          }
         ]
        },
        "input": {
         "type": "string"
        },
        "summary": {
         "type": "array",
         "items": {
          "type": "object"
         }
        },
        "status": {
         "type": "string"
        },
        "action": {
         "type": "object"
        },
        "actions": {
         "type": "array",
         "items": {}
        },
        "operation": {
         "type": "object"
        },
        "code": {
         "type": "string"
        },
        "container_id": {
         "type": "string"
        },
        "environment": {
         "type": "object"
        },
        "outputs": {
         "oneOf": [
          {
           "type": "array",
           "items": {}
          },
          {
           "type": "null"
          }
         ]
        },
        "queries": {
         "type": "array",
         "items": {}
        },
        "results": {
         "oneOf": [
          {
           "type": "array",
           "items": {}
          },
          {
           "type": "null"
          }
         ]
        },
        "result": {
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "null"
          }
         ]
        },
        "revised_prompt": {
         "type": "string"
        },
        "output_format": {
         "type": "string"
        },
        "server_label": {
         "type": "string"
        },
        "tools": {
         "type": "array",
         "items": {}
        },
        "approval_request_id": {
         "type": "string"
        },
        "max_output_length": {
         "type": "integer"
        },
        "pending_safety_checks": {
         "type": "array",
         "items": {}
        },
        "output": {
         "description": "mcp_call: the tool's text; shell_call_output: each command's stdout, stderr and outcome.",
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          {
           "type": "null"
          }
         ]
        },
        "error": {
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "object"
          },
          {
           "type": "null"
          }
         ]
        }
       }
      }
     },
     "output_text": {
      "type": "string",
      "description": "All output text joined (SDK convenience; not on a stored or background response)."
     },
     "previous_response_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "error": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "code": {
        "type": "string"
       },
       "message": {
        "type": "string"
       }
      }
     },
     "incomplete_details": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "reason": {
        "type": "string",
        "enum": [
         "max_output_tokens",
         "content_filter"
        ]
       }
      }
     },
     "instructions": {
      "type": [
       "string",
       "null"
      ]
     },
     "max_output_tokens": {
      "type": [
       "integer",
       "null"
      ]
     },
     "max_tool_calls": {
      "type": "null"
     },
     "parallel_tool_calls": {
      "type": "boolean"
     },
     "reasoning": {
      "type": "object"
     },
     "service_tier": {
      "const": "default"
     },
     "store": {
      "type": "boolean"
     },
     "temperature": {
      "type": [
       "number",
       "null"
      ]
     },
     "text": {
      "type": "object"
     },
     "tool_choice": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "object"
       }
      ]
     },
     "tools": {
      "type": "array",
      "items": {
       "type": "object"
      }
     },
     "top_logprobs": {
      "type": "integer"
     },
     "top_p": {
      "type": [
       "number",
       "null"
      ]
     },
     "truncation": {
      "const": "disabled"
     },
     "user": {
      "type": [
       "string",
       "null"
      ]
     },
     "metadata": {
      "type": "object"
     },
     "usage": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "input_tokens": {
        "type": "integer"
       },
       "input_tokens_details": {
        "type": "object",
        "properties": {
         "cached_tokens": {
          "type": "integer"
         }
        }
       },
       "output_tokens": {
        "type": "integer"
       },
       "output_tokens_details": {
        "type": "object",
        "properties": {
         "reasoning_tokens": {
          "type": "integer"
         }
        }
       },
       "total_tokens": {
        "type": "integer"
       }
      }
     },
     "dyadic": {
      "type": "object",
      "properties": {
       "permissions": {
        "type": "object",
        "properties": {
         "requested_mode": {
          "type": "string"
         },
         "effective_mode": {
          "type": "string"
         },
         "profile_id": {
          "type": "string",
          "format": "uuid"
         },
         "snapshot_id": {
          "type": "string",
          "format": "uuid"
         }
        }
       },
       "pog": {
        "type": "object"
       }
      }
     }
    }
   },
   "ResponseStreamEvent": {
    "type": "object",
    "required": [
     "type",
     "sequence_number"
    ],
    "properties": {
     "type": {
      "type": "string",
      "examples": [
       "response.created",
       "response.in_progress",
       "response.output_item.added",
       "response.content_part.added",
       "response.output_text.delta",
       "response.reasoning_summary_text.delta",
       "response.function_call_arguments.delta",
       "response.output_text.done",
       "response.output_item.done",
       "response.completed",
       "response.incomplete",
       "response.failed"
      ]
     },
     "sequence_number": {
      "type": "integer"
     }
    }
   },
   "ResponseDeleted": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "response.deleted"
     },
     "deleted": {
      "type": "boolean"
     }
    }
   },
   "InputItemList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ResponseInputItem"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "InputTokensRequest": {
    "type": "object",
    "properties": {
     "model": {
      "type": "string",
      "examples": [
       "iris",
       "iris-think"
      ],
      "description": "Omitted: the key's first agent."
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ResponseInputItem"
        }
       }
      ],
      "description": "Text or input items. Omitted, this turn is an empty user message."
     },
     "instructions": {
      "type": "string",
      "description": "A system message for this response only (not carried by previous_response_id)."
     },
     "previous_response_id": {
      "type": "string",
      "description": "Continue from a stored response (up to 100 back): its input and output come first. Unknown: 404 previous_response_not_found."
     },
     "conversation": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         }
        }
       }
      ],
      "description": "A conversation (conv_...): its items come first, and this response's input and output are added to it. Not with previous_response_id. Unknown: 404 conversation_not_found; full: 400 conversation_full."
     },
     "tools": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string",
         "enum": [
          "function",
          "custom",
          "namespace",
          "tool_search",
          "web_search",
          "web_search_preview",
          "web_search_2025_08_26",
          "web_search_preview_2025_03_11",
          "code_interpreter",
          "shell",
          "file_search",
          "image_generation",
          "mcp",
          "computer",
          "computer_use_preview",
          "apply_patch"
         ],
         "description": "Supported tool kinds; local shell, computer and apply_patch execute in the client application, subject to its authorization."
        },
        "name": {
         "type": "string"
        },
        "description": {
         "type": "string"
        },
        "parameters": {
         "type": "object"
        },
        "strict": {
         "type": "boolean"
        },
        "format": {
         "type": "object",
         "description": "custom: {type: grammar, syntax, definition}, added to the tool's description."
        },
        "tools": {
         "type": "array",
         "items": {
          "type": "object"
         },
         "description": "namespace: its function and custom tools."
        },
        "execution": {
         "type": "string",
         "description": "tool_search: client offers your app's tool search to the model."
        },
        "container": {
         "description": "code_interpreter: a container id, or {type: auto} to make one ({type: container_reference, container_id} names one).",
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "object",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "auto",
              "container_reference"
             ]
            },
            "container_id": {
             "type": "string"
            },
            "file_ids": {
             "type": "array",
             "items": {
              "type": "string"
             },
             "maxItems": 50,
             "description": "Files uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files), copied in."
            },
            "memory_limit": {
             "type": "string",
             "enum": [
              "1g"
             ],
             "default": "1g"
            },
            "network_policy": {
             "type": "object",
             "properties": {
              "type": {
               "const": "disabled"
              }
             },
             "description": "Containers have no network: only {type: disabled}."
            },
            "skills": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/SkillReference"
             },
             "maxItems": 10
            }
           }
          }
         ]
        },
        "environment": {
         "description": "shell: container_auto (the default) makes a container, container_reference names one, local runs the commands in your app. A string: a container id (shell), or computer_use_preview's environment name (not used).",
         "oneOf": [
          {
           "type": "object",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "container_auto",
              "container_reference",
              "local"
             ]
            },
            "container_id": {
             "type": "string"
            },
            "file_ids": {
             "type": "array",
             "items": {
              "type": "string"
             },
             "maxItems": 50,
             "description": "Files uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files), copied in."
            },
            "memory_limit": {
             "type": "string",
             "enum": [
              "1g"
             ],
             "default": "1g"
            },
            "network_policy": {
             "type": "object",
             "properties": {
              "type": {
               "const": "disabled"
              }
             },
             "description": "Containers have no network: only {type: disabled}."
            },
            "skills": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/SkillReference"
             },
             "maxItems": 10
            }
           }
          },
          {
           "type": "string"
          }
         ]
        },
        "vector_store_ids": {
         "type": "array",
         "items": {
          "type": "string"
         },
         "minItems": 1,
         "maxItems": 2,
         "description": "file_search: required."
        },
        "max_num_results": {
         "type": "integer",
         "minimum": 1,
         "maximum": 50,
         "default": 10
        },
        "filters": {
         "$ref": "#/components/schemas/VectorStoreFilter"
        },
        "ranking_options": {
         "type": "object",
         "properties": {
          "score_threshold": {
           "type": "number",
           "minimum": 0,
           "maximum": 1,
           "default": 0
          }
         }
        },
        "server_label": {
         "type": "string",
         "pattern": "^[A-Za-z0-9_-]{1,64}$"
        },
        "server_url": {
         "type": "string",
         "format": "uri",
         "description": "A public https:// address on the standard port (no IP address or credentials)."
        },
        "server_description": {
         "type": "string",
         "description": "Shown to the model (up to 500 characters)."
        },
        "headers": {
         "type": "object",
         "maxProperties": 20,
         "additionalProperties": {
          "type": "string",
          "maxLength": 8192
         }
        },
        "authorization": {
         "type": "string",
         "maxLength": 8192,
         "description": "Sent as Authorization: Bearer <token>, or as given when it starts with Bearer or Basic."
        },
        "allowed_tools": {
         "oneOf": [
          {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          {
           "type": "object",
           "properties": {
            "tool_names": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          }
         ]
        },
        "require_approval": {
         "oneOf": [
          {
           "type": "string",
           "enum": [
            "always",
            "never"
           ]
          },
          {
           "type": "object",
           "properties": {
            "always": {
             "type": "object",
             "properties": {
              "tool_names": {
               "type": "array",
               "items": {
                "type": "string"
               }
              }
             }
            },
            "never": {
             "type": "object",
             "properties": {
              "tool_names": {
               "type": "array",
               "items": {
                "type": "string"
               }
              }
             }
            }
           }
          }
         ],
         "default": "always",
         "description": "An object skips approval only for a tool named under never and not under always."
        },
        "display_width": {
         "type": "integer",
         "minimum": 1,
         "description": "Accepted, not used: coordinates are pixels in your latest screenshot."
        },
        "display_height": {
         "type": "integer",
         "minimum": 1,
         "description": "Accepted, not used."
        }
       }
      },
      "description": "Web search needs the key's Agent Tools permission."
     },
     "tool_choice": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none",
         "required"
        ]
       },
       {
        "type": "object"
       }
      ],
      "description": "auto, none, required, {type: function or custom, name}, {type: allowed_tools, mode: auto or required}, {type: shell, computer, apply_patch or tool_search}; web search or a hosted tool counts as auto."
     },
     "parallel_tool_calls": {
      "type": "boolean"
     },
     "text": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "format": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "enum": [
           "text",
           "json_object",
           "json_schema"
          ]
         },
         "name": {
          "type": "string"
         },
         "schema": {
          "type": "object"
         },
         "strict": {
          "type": "boolean"
         }
        }
       },
       "verbosity": {
        "type": "string",
        "enum": [
         "low",
         "medium",
         "high"
        ],
        "description": "How long the answer should be."
       }
      }
     },
     "reasoning": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "effort": {
        "type": "string",
        "enum": [
         "none",
         "minimal",
         "low",
         "medium",
         "high",
         "xhigh"
        ],
        "description": "How much the model may think before answering, on models that support it."
       },
       "context": {
        "type": "string",
        "enum": [
         "auto",
         "current_turn",
         "all_turns"
        ]
       },
       "summary": {
        "type": "string",
        "description": "Accepted without effect."
       },
       "generate_summary": {
        "type": "string",
        "description": "As summary."
       }
      }
     },
     "truncation": {
      "type": "string",
      "enum": [
       "disabled"
      ]
     }
    }
   },
   "InputTokens": {
    "type": "object",
    "properties": {
     "object": {
      "const": "response.input_tokens"
     },
     "input_tokens": {
      "type": "integer"
     }
    }
   },
   "CompactRequest": {
    "type": "object",
    "required": [
     "model"
    ],
    "properties": {
     "model": {
      "type": "string",
      "examples": [
       "iris",
       "iris-think"
      ],
      "description": "iris or iris-think (see Models: OpenAI model names run as iris). Unknown: 404 model_not_found."
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ResponseInputItem"
        }
       }
      ],
      "description": "Text or input items. Omitted, this turn is an empty user message."
     },
     "instructions": {
      "type": "string",
      "description": "A system message for this response only (not carried by previous_response_id)."
     },
     "previous_response_id": {
      "type": "string",
      "description": "Continue from a stored response (up to 100 back): its input and output come first. Unknown: 404 previous_response_not_found."
     }
    },
    "description": "input, previous_response_id or both."
   },
   "Compaction": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "response.compaction"
     },
     "created_at": {
      "type": "integer"
     },
     "output": {
      "type": "array",
      "items": {
       "type": "object"
      },
      "description": "Your user messages, then one item {id, type: compaction, encrypted_content}."
     },
     "usage": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "input_tokens": {
        "type": "integer"
       },
       "input_tokens_details": {
        "type": "object",
        "properties": {
         "cached_tokens": {
          "type": "integer"
         }
        }
       },
       "output_tokens": {
        "type": "integer"
       },
       "output_tokens_details": {
        "type": "object",
        "properties": {
         "reasoning_tokens": {
          "type": "integer"
         }
        }
       },
       "total_tokens": {
        "type": "integer"
       }
      }
     }
    }
   },
   "Conversation": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "conversation"
     },
     "created_at": {
      "type": "integer"
     },
     "metadata": {
      "type": "object"
     }
    }
   },
   "ConversationItem": {
    "type": "object",
    "description": "A stored item: an id (yours, cut to 120 characters, or a new one when it is taken or absent) and, but for reasoning and compaction, a status.",
    "properties": {
     "type": {
      "type": "string",
      "enum": [
       "message",
       "function_call",
       "function_call_output",
       "reasoning",
       "compaction"
      ]
     },
     "id": {
      "type": "string"
     },
     "status": {
      "type": "string"
     },
     "role": {
      "type": "string",
      "enum": [
       "user",
       "assistant",
       "system",
       "developer"
      ]
     },
     "content": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "object",
         "required": [
          "type"
         ]
        }
       }
      ],
      "description": "Text (stored as one input_text or output_text part) or typed parts."
     },
     "call_id": {
      "type": "string",
      "description": "Required on function_call and function_call_output."
     },
     "name": {
      "type": "string",
      "description": "Required on function_call."
     },
     "arguments": {
      "type": "string"
     },
     "output": {
      "type": "string"
     },
     "summary": {
      "type": "array",
      "items": {
       "type": "object"
      }
     },
     "encrypted_content": {
      "type": "string",
      "description": "Required on compaction."
     }
    }
   },
   "ConversationRequest": {
    "type": "object",
    "properties": {
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ConversationItem"
      },
      "maxItems": 20
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "propertyNames": {
       "minLength": 1,
       "maxLength": 64
      },
      "maxProperties": 16,
      "description": "Up to 16 string keys (1 to 64 characters) and string values (up to 512)."
     }
    }
   },
   "ConversationUpdate": {
    "type": "object",
    "properties": {
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "propertyNames": {
       "minLength": 1,
       "maxLength": 64
      },
      "maxProperties": 16,
      "description": "Replaces the metadata; omitted or null clears it."
     }
    }
   },
   "ConversationItems": {
    "type": "object",
    "required": [
     "items"
    ],
    "properties": {
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ConversationItem"
      },
      "minItems": 1,
      "maxItems": 20
     }
    }
   },
   "ConversationDeleted": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "conversation.deleted"
     },
     "deleted": {
      "type": "boolean"
     }
    }
   },
   "ConversationItemList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ConversationItem"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "ChatCompletionList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ChatCompletion"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "ChatCompletionDeleted": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "chat.completion.deleted"
     },
     "deleted": {
      "type": "boolean"
     }
    }
   },
   "ChatCompletionMessageList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "role": {
         "type": "string"
        },
        "content": {
         "type": [
          "string",
          "null"
         ]
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "content_parts": {
         "type": [
          "array",
          "null"
         ]
        },
        "tool_calls": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/ToolCall"
         }
        },
        "tool_call_id": {
         "type": "string"
        }
       }
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "EmbeddingRequest": {
    "type": "object",
    "required": [
     "model",
     "input"
    ],
    "properties": {
     "model": {
      "type": "string",
      "enum": [
       "iris-embed",
       "iris-embed-large",
       "text-embedding-3-small",
       "text-embedding-3-large",
       "text-embedding-ada-002"
      ],
      "description": "iris-embed is the embedding model Dyadic chooses."
     },
     "input": {
      "oneOf": [
       {
        "type": "string",
        "minLength": 1,
        "maxLength": 32000
       },
       {
        "type": "array",
        "items": {
         "type": "string",
         "minLength": 1,
         "maxLength": 32000
        },
        "minItems": 1,
        "maxItems": 2048
       }
      ],
      "description": "Text: one string or up to 2048, each up to 32,000 characters and 1,000,000 in all. Token arrays aren't taken."
     },
     "dimensions": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3072,
      "description": "Shorter vectors (text-embedding-3 models)."
     },
     "encoding_format": {
      "type": "string",
      "enum": [
       "float",
       "base64"
      ],
      "default": "float"
     },
     "user": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     }
    },
    "example": {
     "model": "text-embedding-3-small",
     "input": [
      "The quick brown fox",
      "jumps over the lazy dog"
     ]
    }
   },
   "EmbeddingList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "model": {
      "type": "string"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "object": {
         "const": "embedding"
        },
        "index": {
         "type": "integer"
        },
        "embedding": {
         "oneOf": [
          {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          {
           "type": "string"
          }
         ]
        }
       }
      }
     },
     "usage": {
      "type": "object",
      "properties": {
       "prompt_tokens": {
        "type": "integer"
       },
       "total_tokens": {
        "type": "integer"
       }
      }
     }
    }
   },
   "SpeechRequest": {
    "type": "object",
    "required": [
     "model",
     "input"
    ],
    "properties": {
     "model": {
      "type": "string",
      "enum": [
       "iris-voice",
       "tts-1",
       "tts-1-hd",
       "gpt-4o-mini-tts",
       "gpt-4o-tts"
      ]
     },
     "input": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096
     },
     "voice": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "alloy",
         "ash",
         "ballad",
         "coral",
         "echo",
         "fable",
         "nova",
         "onyx",
         "sage",
         "shimmer",
         "verse",
         "marin",
         "cedar",
         "eve",
         "ara",
         "rex",
         "sal",
         "leo"
        ]
       },
       {
        "type": "object",
        "required": [
         "id"
        ],
        "properties": {
         "id": {
          "type": "string",
          "enum": [
           "alloy",
           "ash",
           "ballad",
           "coral",
           "echo",
           "fable",
           "nova",
           "onyx",
           "sage",
           "shimmer",
           "verse",
           "marin",
           "cedar",
           "eve",
           "ara",
           "rex",
           "sal",
           "leo"
          ]
         }
        }
       }
      ],
      "description": "OpenAI's voice names (mapped onto the speech model's voices) or Iris's. Required but with iris-voice, which defaults to the speech model's voice."
     },
     "response_format": {
      "type": "string",
      "enum": [
       "mp3",
       "wav",
       "pcm"
      ],
      "default": "mp3"
     },
     "speed": {
      "type": "number",
      "minimum": 0.25,
      "maximum": 4
     },
     "stream_format": {
      "type": "string",
      "enum": [
       "audio"
      ],
      "description": "The audio comes back as one file; sse is refused."
     }
    },
    "example": {
     "model": "tts-1",
     "voice": "alloy",
     "input": "Hello from Dyadic."
    }
   },
   "TranscriptionRequest": {
    "type": "object",
    "required": [
     "file",
     "model"
    ],
    "properties": {
     "file": {
      "type": "string",
      "format": "binary",
      "description": "flac, m4a, mp3, mp4, mpeg, mpga, oga, ogg, wav or webm, up to 25 MB."
     },
     "model": {
      "type": "string",
      "enum": [
       "iris-transcribe",
       "whisper-1",
       "gpt-4o-transcribe",
       "gpt-4o-mini-transcribe",
       "whisper-large-v3",
       "whisper-large-v3-turbo"
      ]
     },
     "prompt": {
      "type": "string"
     },
     "response_format": {
      "type": "string",
      "enum": [
       "json",
       "text",
       "srt",
       "verbose_json",
       "vtt"
      ],
      "default": "json",
      "description": "srt and vtt need a model that returns timed segments (else 400)."
     },
     "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "stream": {
      "type": "boolean",
      "enum": [
       false
      ]
     },
     "language": {
      "type": "string",
      "description": "ISO-639-1, for example en."
     },
     "timestamp_granularities[]": {
      "type": "array",
      "items": {
       "type": "string",
       "enum": [
        "word",
        "segment"
       ]
      }
     }
    }
   },
   "TranslationRequest": {
    "type": "object",
    "required": [
     "file",
     "model"
    ],
    "properties": {
     "file": {
      "type": "string",
      "format": "binary",
      "description": "flac, m4a, mp3, mp4, mpeg, mpga, oga, ogg, wav or webm, up to 25 MB."
     },
     "model": {
      "type": "string",
      "enum": [
       "iris-transcribe",
       "whisper-1",
       "gpt-4o-transcribe",
       "gpt-4o-mini-transcribe",
       "whisper-large-v3",
       "whisper-large-v3-turbo"
      ]
     },
     "prompt": {
      "type": "string"
     },
     "response_format": {
      "type": "string",
      "enum": [
       "json",
       "text",
       "verbose_json"
      ],
      "default": "json"
     },
     "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "stream": {
      "type": "boolean",
      "enum": [
       false
      ]
     }
    }
   },
   "Transcription": {
    "type": "object",
    "properties": {
     "task": {
      "type": "string",
      "enum": [
       "transcribe",
       "translate"
      ],
      "description": "verbose_json."
     },
     "text": {
      "type": "string"
     },
     "language": {
      "type": "string",
      "description": "verbose_json (english for a translation)."
     },
     "duration": {
      "type": "number",
      "description": "verbose_json."
     },
     "segments": {
      "type": "array",
      "items": {
       "type": "object"
      },
      "description": "verbose_json transcription."
     },
     "words": {
      "type": "array",
      "items": {
       "type": "object"
      },
      "description": "verbose_json transcription."
     },
     "usage": {
      "type": "object",
      "description": "json: {type: duration, seconds} or {type: tokens, input_tokens, output_tokens, total_tokens}.",
      "properties": {
       "type": {
        "type": "string",
        "enum": [
         "duration",
         "tokens"
        ]
       },
       "seconds": {
        "type": "number"
       },
       "input_tokens": {
        "type": "integer"
       },
       "output_tokens": {
        "type": "integer"
       },
       "total_tokens": {
        "type": "integer"
       }
      }
     }
    }
   },
   "ModerationRequest": {
    "type": "object",
    "required": [
     "input"
    ],
    "properties": {
     "model": {
      "type": "string",
      "enum": [
       "iris-moderation",
       "omni-moderation-latest",
       "omni-moderation-2024-09-26",
       "text-moderation-latest",
       "text-moderation-stable"
      ],
      "default": "omni-moderation-latest",
      "description": "Named in the answer; Dyadic's own classifier scores every request. Unknown: 404 model_not_found."
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "string"
        },
        "minItems": 1,
        "maxItems": 32
       },
       {
        "type": "array",
        "minItems": 1,
        "items": {
         "oneOf": [
          {
           "type": "object",
           "required": [
            "type",
            "text"
           ],
           "properties": {
            "type": {
             "const": "text"
            },
            "text": {
             "type": "string"
            }
           }
          },
          {
           "type": "object",
           "required": [
            "type",
            "image_url"
           ],
           "properties": {
            "type": {
             "const": "image_url"
            },
            "image_url": {
             "type": "object",
             "required": [
              "url"
             ],
             "properties": {
              "url": {
               "type": "string"
              }
             }
            }
           }
          }
         ]
        },
        "description": "One input of text and image parts."
       }
      ],
      "description": "A string, up to 32 strings, or text and image parts; 100,000 characters in all."
     }
    },
    "example": {
     "input": "I want to learn to bake bread."
    }
   },
   "Moderation": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "model": {
      "type": "string"
     },
     "results": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "flagged": {
         "type": "boolean"
        },
        "categories": {
         "type": "object",
         "properties": {
          "harassment": {
           "type": "boolean"
          },
          "harassment/threatening": {
           "type": "boolean"
          },
          "hate": {
           "type": "boolean"
          },
          "hate/threatening": {
           "type": "boolean"
          },
          "illicit": {
           "type": "boolean"
          },
          "illicit/violent": {
           "type": "boolean"
          },
          "self-harm": {
           "type": "boolean"
          },
          "self-harm/intent": {
           "type": "boolean"
          },
          "self-harm/instructions": {
           "type": "boolean"
          },
          "sexual": {
           "type": "boolean"
          },
          "sexual/minors": {
           "type": "boolean"
          },
          "violence": {
           "type": "boolean"
          },
          "violence/graphic": {
           "type": "boolean"
          }
         }
        },
        "category_scores": {
         "type": "object",
         "properties": {
          "harassment": {
           "type": "number"
          },
          "harassment/threatening": {
           "type": "number"
          },
          "hate": {
           "type": "number"
          },
          "hate/threatening": {
           "type": "number"
          },
          "illicit": {
           "type": "number"
          },
          "illicit/violent": {
           "type": "number"
          },
          "self-harm": {
           "type": "number"
          },
          "self-harm/intent": {
           "type": "number"
          },
          "self-harm/instructions": {
           "type": "number"
          },
          "sexual": {
           "type": "number"
          },
          "sexual/minors": {
           "type": "number"
          },
          "violence": {
           "type": "number"
          },
          "violence/graphic": {
           "type": "number"
          }
         }
        },
        "category_applied_input_types": {
         "type": "object"
        }
       }
      }
     }
    }
   },
   "DecisionRequest": {
    "type": "object",
    "required": [
     "input",
     "questions"
    ],
    "properties": {
     "model": {
      "type": "string",
      "pattern": "^~?[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._:-]*$|^[a-z0-9][a-z0-9._:-]*$",
      "description": "An OpenRouter decision model (author/model, such as typesafe/jev-1.14 or ~typesafe/jev-latest) or an OpenAI model id (gpt-6-luna). Omitted: Dyadic's choice (by default typesafe/jev-1.14, or gpt-6-luna for input with images)."
     },
     "input": {
      "oneOf": [
       {
        "type": "string",
        "minLength": 1
       },
       {
        "type": "array",
        "minItems": 1,
        "items": {
         "type": "object",
         "required": [
          "content"
         ],
         "properties": {
          "role": {
           "type": "string",
           "enum": [
            "user"
           ],
           "default": "user"
          },
          "content": {
           "type": "array",
           "items": {
            "oneOf": [
             {
              "type": "object",
              "required": [
               "type",
               "text"
              ],
              "properties": {
               "type": {
                "const": "input_text"
               },
               "text": {
                "type": "string"
               }
              }
             },
             {
              "type": "object",
              "required": [
               "type",
               "image_url"
              ],
              "properties": {
               "type": {
                "const": "input_image"
               },
               "image_url": {
                "type": "string",
                "description": "An inline base64 data:image/ URL (png, jpeg, webp or gif)."
               }
              }
             }
            ]
           }
          }
         }
        }
       }
      ],
      "description": "The evidence: up to 200,000 characters and 8 images."
     },
     "questions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 32,
      "items": {
       "type": "object",
       "required": [
        "type",
        "name",
        "instructions"
       ],
       "properties": {
        "type": {
         "type": "string",
         "enum": [
          "predicate",
          "choice",
          "score"
         ]
        },
        "name": {
         "type": "string",
         "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
         "description": "Unique in the request."
        },
        "instructions": {
         "type": "string",
         "minLength": 1
        },
        "choices": {
         "type": "array",
         "minItems": 2,
         "maxItems": 32,
         "items": {
          "type": "object",
          "required": [
           "value",
           "description"
          ],
          "properties": {
           "value": {
            "type": "string",
            "minLength": 1
           },
           "description": {
            "type": "string"
           }
          },
          "description": "A unique value and its description."
         },
         "description": "Required on choice."
        },
        "levels": {
         "type": "array",
         "minItems": 2,
         "maxItems": 32,
         "items": {
          "type": "object",
          "required": [
           "label",
           "description"
          ],
          "properties": {
           "label": {
            "type": "string",
            "minLength": 1
           },
           "description": {
            "type": "string"
           }
          },
          "description": "A unique label and its description."
         },
         "description": "Required on score, lowest first."
        }
       }
      }
     }
    },
    "example": {
     "input": "I can't log in after resetting my password.",
     "questions": [
      {
       "type": "predicate",
       "name": "urgent",
       "instructions": "The customer is blocked from using the product."
      },
      {
       "type": "choice",
       "name": "team",
       "instructions": "Which team should handle this.",
       "choices": [
        {
         "value": "account",
         "description": "Sign-in, passwords and account access"
        },
        {
         "value": "billing",
         "description": "Payments and invoices"
        },
        {
         "value": "other",
         "description": "Anything else"
        }
       ]
      }
     ]
    }
   },
   "Decision": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "decision"
     },
     "model": {
      "type": "string"
     },
     "answers": {
      "type": "array",
      "description": "One per question, in order.",
      "items": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string",
         "enum": [
          "predicate",
          "choice",
          "score",
          "refusal"
         ]
        },
        "name": {
         "type": "string"
        },
        "probability": {
         "type": "number",
         "description": "predicate: 0 to 1."
        },
        "choice": {
         "type": "string"
        },
        "score": {
         "type": "number",
         "description": "score: the probability-weighted level index, from 0."
        },
        "confidence": {
         "type": "number"
        },
        "probabilities": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "value": {
            "oneOf": [
             {
              "type": "string"
             },
             {
              "type": "integer"
             }
            ]
           },
           "label": {
            "type": "string"
           },
           "probability": {
            "type": "number"
           }
          }
         }
        }
       }
      }
     },
     "usage": {
      "type": "object",
      "properties": {
       "input_tokens": {
        "type": "integer"
       },
       "output_tokens": {
        "type": [
         "integer",
         "null"
        ]
       },
       "cost": {
        "type": "number",
        "description": "The provider's cost in USD: as reported, or from the input tokens."
       },
       "cost_basis": {
        "type": "string"
       },
       "token_source": {
        "type": "string"
       },
       "input_tokens_basis": {
        "type": "string",
        "enum": [
         "reported",
         "estimated_input_bound"
        ]
       }
      }
     }
    }
   },
   "ImageEditRequest": {
    "type": "object",
    "required": [
     "image",
     "prompt"
    ],
    "properties": {
     "image": {
      "type": "string",
      "format": "binary",
      "description": "One PNG, JPEG, WebP or GIF; the whole upload up to 8 MB."
     },
     "prompt": {
      "type": "string",
      "minLength": 1
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "size": {
      "type": "string",
      "example": "1024x1024",
      "description": "WIDTHxHEIGHT. Its ratio sets the aspect when it is 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 or 2:3; another size is drawn at the model's default aspect."
     },
     "quality": {
      "type": "string",
      "enum": [
       "standard",
       "hd",
       "high",
       "max"
      ],
      "description": "hd and high ask for high quality, max for the most."
     },
     "model": {
      "type": "string",
      "description": "Accepted without effect: Dyadic's image model draws every image."
     },
     "response_format": {
      "type": "string",
      "enum": [
       "b64_json",
       "url"
      ],
      "description": "Accepted without effect: b64_json, or url when the model returns a link."
     },
     "user": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     },
     "dyadic": {
      "type": "string",
      "maxLength": 4096,
      "description": "One JSON-encoded permission selection object. The official SDKs encode an object automatically.",
      "contentMediaType": "application/json",
      "contentSchema": {
       "type": "object",
       "additionalProperties": false,
       "properties": {
        "approval_mode": {
         "type": "string",
         "enum": [
          "ask",
          "edits",
          "auto",
          "bypass",
          "autonomous",
          "custom"
         ],
         "default": "ask"
        },
        "permission_profile_id": {
         "type": "string",
         "format": "uuid",
         "description": "Owned saved profile. Requires Custom; omission uses the account selection."
        }
       }
      }
     }
    }
   },
   "ImageVariationRequest": {
    "type": "object",
    "required": [
     "image"
    ],
    "properties": {
     "image": {
      "type": "string",
      "format": "binary",
      "description": "One PNG, JPEG, WebP or GIF; the whole upload up to 8 MB."
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "size": {
      "type": "string",
      "example": "1024x1024",
      "description": "WIDTHxHEIGHT. Its ratio sets the aspect when it is 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 or 2:3; another size is drawn at the model's default aspect."
     },
     "quality": {
      "type": "string",
      "enum": [
       "standard",
       "hd",
       "high",
       "max"
      ],
      "description": "hd and high ask for high quality, max for the most."
     },
     "model": {
      "type": "string",
      "description": "Accepted without effect: Dyadic's image model draws every image."
     },
     "response_format": {
      "type": "string",
      "enum": [
       "b64_json",
       "url"
      ],
      "description": "Accepted without effect: b64_json, or url when the model returns a link."
     },
     "user": {
      "type": "string",
      "description": "Your own end-user identifier, kept in the activity log only."
     },
     "dyadic": {
      "type": "string",
      "maxLength": 4096,
      "description": "One JSON-encoded permission selection object. The official SDKs encode an object automatically.",
      "contentMediaType": "application/json",
      "contentSchema": {
       "type": "object",
       "additionalProperties": false,
       "properties": {
        "approval_mode": {
         "type": "string",
         "enum": [
          "ask",
          "edits",
          "auto",
          "bypass",
          "autonomous",
          "custom"
         ],
         "default": "ask"
        },
        "permission_profile_id": {
         "type": "string",
         "format": "uuid",
         "description": "Owned saved profile. Requires Custom; omission uses the account selection."
        }
       }
      }
     }
    }
   },
   "FileUploadRequest": {
    "type": "object",
    "required": [
     "file",
     "purpose"
    ],
    "properties": {
     "file": {
      "type": "string",
      "format": "binary",
      "description": "Up to 20 MB (100 MB for batch .jsonl files). An image must be a PNG, JPEG, WebP or GIF. Counts toward your Workspace storage."
     },
     "purpose": {
      "type": "string",
      "enum": [
       "assistants",
       "batch",
       "fine-tune",
       "vision",
       "user_data",
       "evals"
      ]
     }
    }
   },
   "File": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "file-6f1b2c4e111142228333444455556666"
     },
     "object": {
      "const": "file"
     },
     "bytes": {
      "type": "integer"
     },
     "created_at": {
      "type": "integer"
     },
     "filename": {
      "type": "string"
     },
     "purpose": {
      "type": "string",
      "description": "As uploaded; batch_output for a batch's output and error files."
     },
     "status": {
      "const": "processed"
     },
     "status_details": {
      "type": "null"
     },
     "expires_at": {
      "type": "null",
      "description": "Files stay until deleted."
     }
    }
   },
   "FileList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/File"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "FileDeleted": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "file"
     },
     "deleted": {
      "type": "boolean"
     }
    }
   },
   "BatchRequest": {
    "type": "object",
    "required": [
     "input_file_id",
     "endpoint"
    ],
    "properties": {
     "input_file_id": {
      "type": "string",
      "description": "An uploaded .jsonl file (purpose batch takes up to 100 MB): one {custom_id (unique), method: POST, url (the endpoint), body} per line, up to 5,000 lines of up to 2 MB."
     },
     "endpoint": {
      "type": "string",
      "enum": [
       "/v1/chat/completions",
       "/v1/completions",
       "/v1/embeddings",
       "/v1/responses",
       "/v1/moderations",
       "/v1/decisions"
      ]
     },
     "completion_window": {
      "type": "string",
      "enum": [
       "24h"
      ],
      "default": "24h"
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      },
      "maxProperties": 16
     }
    }
   },
   "Batch": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "batch"
     },
     "endpoint": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "validating",
       "failed",
       "in_progress",
       "finalizing",
       "completed",
       "expired",
       "cancelling",
       "cancelled"
      ]
     },
     "input_file_id": {
      "type": "string"
     },
     "output_file_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "error_file_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "errors": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "object": {
        "const": "list"
       },
       "data": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "message": {
           "type": "string"
          },
          "param": {
           "type": [
            "string",
            "null"
           ]
          },
          "line": {
           "type": [
            "integer",
            "null"
           ]
          }
         }
        }
       }
      },
      "description": "Why the batch failed: the input file's problems (the first 50), or a file it couldn't write."
     },
     "completion_window": {
      "type": "string"
     },
     "request_counts": {
      "type": "object",
      "properties": {
       "total": {
        "type": "integer"
       },
       "completed": {
        "type": "integer"
       },
       "failed": {
        "type": "integer"
       }
      }
     },
     "created_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "in_progress_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "expires_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "finalizing_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "completed_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "failed_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "expired_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "cancelling_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "cancelled_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "metadata": {
      "type": "object"
     }
    }
   },
   "BatchList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Batch"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "PublicWebResult": {
    "type": "object",
    "required": [
     "data",
     "usage",
     "cost_usd",
     "operation_id"
    ],
    "properties": {
     "data": {
      "type": "object"
     },
     "usage": {
      "type": "object"
     },
     "cost_usd": {
      "type": "number",
      "const": 0
     },
     "operation_id": {
      "type": "string"
     },
     "dyadic": {
      "type": "object",
      "properties": {
       "permissions": {
        "type": "object",
        "properties": {
         "requested_mode": {
          "type": "string"
         },
         "effective_mode": {
          "type": "string"
         },
         "profile_id": {
          "type": "string",
          "format": "uuid"
         },
         "snapshot_id": {
          "type": "string",
          "format": "uuid"
         }
        }
       }
      }
     }
    }
   },
   "PublicWebSearch": {
    "type": "object",
    "required": [
     "query"
    ],
    "additionalProperties": false,
    "properties": {
     "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
     },
     "max_results": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 5
     },
     "dyadic": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "approval_mode": {
        "type": "string",
        "enum": [
         "ask",
         "edits",
         "auto",
         "bypass",
         "autonomous",
         "custom"
        ],
        "default": "ask"
       },
       "permission_profile_id": {
        "type": "string",
        "format": "uuid",
        "description": "Owned saved profile. Requires Custom; omission uses the account selection."
       }
      }
     }
    }
   },
   "PublicWebRead": {
    "type": "object",
    "required": [
     "url"
    ],
    "additionalProperties": false,
    "properties": {
     "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2000
     },
     "max_chars": {
      "type": "integer",
      "minimum": 200,
      "maximum": 4000,
      "default": 4000
     },
     "max_age_seconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 7200,
      "default": 900
     },
     "dyadic": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
       "approval_mode": {
        "type": "string",
        "enum": [
         "ask",
         "edits",
         "auto",
         "bypass",
         "autonomous",
         "custom"
        ],
        "default": "ask"
       },
       "permission_profile_id": {
        "type": "string",
        "format": "uuid",
        "description": "Owned saved profile. Requires Custom; omission uses the account selection."
       }
      }
     }
    }
   },
   "SkillReference": {
    "type": "object",
    "required": [
     "skill_id"
    ],
    "properties": {
     "type": {
      "const": "skill_reference"
     },
     "skill_id": {
      "type": "string"
     },
     "version": {
      "oneOf": [
       {
        "type": "integer",
        "minimum": 1
       },
       {
        "type": "string",
        "description": "A number, latest or default."
       }
      ],
      "description": "The skill's default version when omitted."
     }
    }
   },
   "ContainerRequest": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 200
     },
     "file_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "maxItems": 50,
      "description": "Files uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files), copied in."
     },
     "expires_after": {
      "type": "object",
      "properties": {
       "anchor": {
        "const": "last_active_at"
       },
       "minutes": {
        "type": "integer",
        "minimum": 1,
        "maximum": 60,
        "default": 20
       }
      }
     },
     "memory_limit": {
      "type": "string",
      "enum": [
       "1g"
      ],
      "default": "1g"
     },
     "network_policy": {
      "type": "object",
      "properties": {
       "type": {
        "const": "disabled"
       }
      },
      "description": "Containers have no network: only {type: disabled}."
     },
     "skills": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/SkillReference"
      },
      "maxItems": 10
     }
    }
   },
   "Container": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "cntr_..."
     },
     "object": {
      "const": "container"
     },
     "created_at": {
      "type": "integer"
     },
     "status": {
      "type": "string",
      "enum": [
       "running",
       "expired"
      ],
      "description": "expired after its minutes without use: its files are removed, and it is kept until 7 days after its last use."
     },
     "expires_after": {
      "type": "object",
      "properties": {
       "anchor": {
        "const": "last_active_at"
       },
       "minutes": {
        "type": "integer"
       }
      }
     },
     "last_active_at": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "memory_limit": {
      "type": "string"
     }
    }
   },
   "ContainerFile": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "cfile_..."
     },
     "object": {
      "const": "container.file"
     },
     "created_at": {
      "type": "integer"
     },
     "bytes": {
      "type": "integer"
     },
     "container_id": {
      "type": "string"
     },
     "path": {
      "type": "string",
      "example": "/mnt/data/data.csv"
     },
     "source": {
      "type": "string",
      "enum": [
       "user",
       "assistant"
      ],
      "description": "assistant: written by code in the container."
     }
    }
   },
   "ContainerFileUpload": {
    "type": "object",
    "properties": {
     "file": {
      "type": "string",
      "format": "binary",
      "description": "Multipart: up to 20 MB, at /mnt/data/<its file name>."
     },
     "file_id": {
      "type": "string",
      "description": "JSON: a file uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files), copied in under its name."
     }
    }
   },
   "ContainerList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Container"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "ContainerFileList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ContainerFile"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "ChunkingStrategy": {
    "type": "object",
    "description": "auto (the default): 800 tokens with 400 of overlap (about 4 characters a token).",
    "properties": {
     "type": {
      "type": "string",
      "enum": [
       "auto",
       "static"
      ]
     },
     "static": {
      "type": "object",
      "required": [
       "max_chunk_size_tokens"
      ],
      "properties": {
       "max_chunk_size_tokens": {
        "type": "integer",
        "minimum": 100,
        "maximum": 4096
       },
       "chunk_overlap_tokens": {
        "type": "integer",
        "minimum": 0,
        "default": 0,
        "description": "At most half of max_chunk_size_tokens."
       }
      }
     }
    }
   },
   "VectorStoreAttributes": {
    "type": "object",
    "maxProperties": 16,
    "propertyNames": {
     "minLength": 1,
     "maxLength": 64
    },
    "additionalProperties": {
     "oneOf": [
      {
       "type": "string",
       "maxLength": 512
      },
      {
       "type": "number"
      },
      {
       "type": "boolean"
      }
     ]
    }
   },
   "VectorStoreFilter": {
    "description": "Compare an attribute, or combine filters (nested up to 5 deep).",
    "oneOf": [
     {
      "type": "object",
      "required": [
       "type",
       "key"
      ],
      "properties": {
       "type": {
        "type": "string",
        "enum": [
         "eq",
         "ne",
         "gt",
         "gte",
         "lt",
         "lte",
         "in",
         "nin"
        ]
       },
       "key": {
        "type": "string"
       },
       "value": {
        "description": "A list for in and nin."
       }
      }
     },
     {
      "type": "object",
      "required": [
       "type",
       "filters"
      ],
      "properties": {
       "type": {
        "type": "string",
        "enum": [
         "and",
         "or"
        ]
       },
       "filters": {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/VectorStoreFilter"
        },
        "minItems": 1,
        "maxItems": 20
       }
      }
     }
    ]
   },
   "VectorStoreRequest": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 256
     },
     "file_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "maxItems": 100,
      "description": "Files uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files)."
     },
     "expires_after": {
      "type": "object",
      "required": [
       "days"
      ],
      "properties": {
       "anchor": {
        "const": "last_active_at"
       },
       "days": {
        "type": "integer",
        "minimum": 1,
        "maximum": 365
       }
      },
      "description": "Expire after this many days without use; never by default."
     },
     "chunking_strategy": {
      "$ref": "#/components/schemas/ChunkingStrategy"
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "propertyNames": {
       "maxLength": 64
      },
      "maxProperties": 16
     }
    }
   },
   "VectorStoreUpdateRequest": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 256
     },
     "expires_after": {
      "oneOf": [
       {
        "type": "object",
        "required": [
         "days"
        ],
        "properties": {
         "anchor": {
          "const": "last_active_at"
         },
         "days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365
         }
        }
       },
       {
        "type": "null"
       }
      ],
      "description": "null: never expire."
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "propertyNames": {
       "maxLength": 64
      },
      "maxProperties": 16
     }
    }
   },
   "VectorStore": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "vs_..."
     },
     "object": {
      "const": "vector_store"
     },
     "created_at": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "usage_bytes": {
      "type": "integer"
     },
     "file_counts": {
      "type": "object",
      "properties": {
       "in_progress": {
        "type": "integer"
       },
       "completed": {
        "type": "integer"
       },
       "failed": {
        "type": "integer"
       },
       "cancelled": {
        "type": "integer"
       },
       "total": {
        "type": "integer"
       }
      }
     },
     "status": {
      "type": "string",
      "enum": [
       "in_progress",
       "completed",
       "expired"
      ],
      "description": "expired: it can't be searched or take files."
     },
     "expires_after": {
      "type": [
       "object",
       "null"
      ]
     },
     "expires_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "last_active_at": {
      "type": "integer"
     },
     "metadata": {
      "type": "object"
     }
    }
   },
   "VectorStoreFileRequest": {
    "type": "object",
    "required": [
     "file_id"
    ],
    "properties": {
     "file_id": {
      "type": "string",
      "description": "A file uploaded with [`POST /files`](https://dyadic.app/developers/api/#dyadic-api/tag/files/POST/files)."
     },
     "attributes": {
      "$ref": "#/components/schemas/VectorStoreAttributes"
     },
     "chunking_strategy": {
      "$ref": "#/components/schemas/ChunkingStrategy"
     }
    }
   },
   "VectorStoreFileUpdateRequest": {
    "type": "object",
    "properties": {
     "attributes": {
      "$ref": "#/components/schemas/VectorStoreAttributes",
      "description": "Replaces the file's attributes; omitted or null clears them."
     }
    }
   },
   "VectorStoreFile": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "file-..."
     },
     "object": {
      "const": "vector_store.file"
     },
     "usage_bytes": {
      "type": "integer"
     },
     "created_at": {
      "type": "integer"
     },
     "vector_store_id": {
      "type": "string"
     },
     "filename": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "in_progress",
       "completed",
       "failed",
       "cancelled"
      ]
     },
     "last_error": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "code": {
        "type": "string",
        "enum": [
         "unsupported_file",
         "scanned",
         "invalid_file",
         "server_error"
        ]
       },
       "message": {
        "type": "string"
       }
      }
     },
     "attributes": {
      "type": "object"
     },
     "chunking_strategy": {
      "type": "object",
      "properties": {
       "type": {
        "const": "static"
       },
       "static": {
        "type": "object",
        "properties": {
         "max_chunk_size_tokens": {
          "type": "integer"
         },
         "chunk_overlap_tokens": {
          "type": "integer"
         }
        }
       }
      }
     }
    }
   },
   "VectorStoreFileBatchRequest": {
    "type": "object",
    "description": "file_ids or files; files is used when both are sent.",
    "properties": {
     "file_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "minItems": 1,
      "maxItems": 500
     },
     "files": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/VectorStoreFileRequest"
      },
      "minItems": 1,
      "maxItems": 500
     },
     "attributes": {
      "$ref": "#/components/schemas/VectorStoreAttributes",
      "description": "For every file in file_ids."
     },
     "chunking_strategy": {
      "$ref": "#/components/schemas/ChunkingStrategy",
      "description": "For every file in file_ids."
     }
    }
   },
   "VectorStoreFileBatch": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "vsfb_..."
     },
     "object": {
      "const": "vector_store.files_batch"
     },
     "created_at": {
      "type": "integer"
     },
     "vector_store_id": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "in_progress",
       "completed",
       "cancelled"
      ]
     },
     "file_counts": {
      "type": "object",
      "properties": {
       "in_progress": {
        "type": "integer"
       },
       "completed": {
        "type": "integer"
       },
       "failed": {
        "type": "integer"
       },
       "cancelled": {
        "type": "integer"
       },
       "total": {
        "type": "integer"
       }
      }
     }
    }
   },
   "VectorStoreSearchRequest": {
    "type": "object",
    "required": [
     "query"
    ],
    "properties": {
     "query": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "string"
        }
       }
      ],
      "description": "1 to 4,000 characters; a list is searched as one text."
     },
     "max_num_results": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 10
     },
     "filters": {
      "$ref": "#/components/schemas/VectorStoreFilter"
     },
     "ranking_options": {
      "type": "object",
      "properties": {
       "score_threshold": {
        "type": "number",
        "minimum": 0,
        "maximum": 1,
        "default": 0
       },
       "ranker": {
        "type": "string",
        "description": "Accepted, no effect: one ranker."
       }
      }
     },
     "rewrite_query": {
      "type": "boolean",
      "description": "Accepted, no effect: the query is searched as written."
     }
    }
   },
   "VectorStoreSearchResults": {
    "type": "object",
    "properties": {
     "object": {
      "const": "vector_store.search_results.page"
     },
     "search_query": {
      "type": "string"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "file_id": {
         "type": "string"
        },
        "filename": {
         "type": "string"
        },
        "score": {
         "type": "number"
        },
        "attributes": {
         "type": "object"
        },
        "content": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "type": {
            "const": "text"
           },
           "text": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "has_more": {
      "type": "boolean",
      "description": "Always false: one page."
     },
     "next_page": {
      "type": "null"
     }
    }
   },
   "VectorStoreFileContent": {
    "type": "object",
    "properties": {
     "object": {
      "const": "vector_store.file_content.page"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "type": {
         "const": "text"
        },
        "text": {
         "type": "string"
        }
       }
      }
     },
     "has_more": {
      "type": "boolean",
      "description": "Always false: one page."
     },
     "next_page": {
      "type": "null"
     }
    }
   },
   "VectorStoreList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/VectorStore"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "VectorStoreFileList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/VectorStoreFile"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "SkillUpload": {
    "type": "object",
    "required": [
     "files"
    ],
    "properties": {
     "files": {
      "type": "array",
      "items": {
       "type": "string",
       "format": "binary"
      },
      "description": "The skill's files, each named by its path (a single top folder is dropped), or one zip of them. SKILL.md at the top starts with front matter: a name (1 to 64 lowercase letters, digits, - or _) and a description (up to 1,024 characters). Up to 500 files and 25 MB unpacked, in an upload of up to 50 MB."
     }
    }
   },
   "SkillVersionUpload": {
    "type": "object",
    "required": [
     "files"
    ],
    "properties": {
     "files": {
      "type": "array",
      "items": {
       "type": "string",
       "format": "binary"
      },
      "description": "The skill's files, each named by its path (a single top folder is dropped), or one zip of them. SKILL.md at the top starts with front matter: a name (1 to 64 lowercase letters, digits, - or _) and a description (up to 1,024 characters). Up to 500 files and 25 MB unpacked, in an upload of up to 50 MB."
     },
     "default": {
      "type": "string",
      "enum": [
       "true",
       "false"
      ],
      "description": "true makes this version the default."
     }
    }
   },
   "Skill": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "skill_..."
     },
     "object": {
      "const": "skill"
     },
     "name": {
      "type": "string"
     },
     "display_name": {
      "type": "string"
     },
     "description": {
      "type": "string"
     },
     "created_at": {
      "type": "integer"
     },
     "default_version": {
      "type": "string",
      "example": "1"
     },
     "latest_version": {
      "type": "string",
      "example": "2"
     },
     "requirements": {
      "type": "object",
      "description": "The tools, skills and MCP servers the skill declares it needs."
     }
    }
   },
   "SkillVersion": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "skill_...@2"
     },
     "object": {
      "const": "skill.version"
     },
     "skill_id": {
      "type": "string"
     },
     "version": {
      "type": "string",
      "example": "2"
     },
     "name": {
      "type": "string"
     },
     "display_name": {
      "type": "string"
     },
     "description": {
      "type": "string"
     },
     "created_at": {
      "type": "integer"
     },
     "bytes": {
      "type": "integer"
     },
     "files": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "requirements": {
      "type": "object",
      "description": "The tools, skills and MCP servers the skill declares it needs."
     }
    }
   },
   "SkillList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Skill"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "SkillVersionList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/SkillVersion"
      }
     },
     "first_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "has_more": {
      "type": "boolean"
     }
    }
   },
   "SkillDefaultRequest": {
    "type": "object",
    "required": [
     "default_version"
    ],
    "properties": {
     "default_version": {
      "oneOf": [
       {
        "type": "string",
        "example": "2"
       },
       {
        "type": "integer",
        "minimum": 1
       }
      ]
     }
    }
   }
  }
 }
}