{
 "openapi": "3.1.0",
 "info": {
  "title": "Dyadic API",
  "version": "1.4.0",
  "description": "Use **Iris** from OpenAI-compatible apps and SDKs. Point the client's base URL at `https://dyadic.app/api/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://dyadic.app/api/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 at [dyadic.app/workspace](/workspace/?view=developers&tab=keys). Send it as `Authorization: Bearer dya-...`.\nEach key has its own permissions and limits.\n\n## Billing\nRequests use your account's AI credits. Every response includes the credits it used (`usage.dyadic` when\nstreaming with `stream_options.include_usage`, `dyadic` otherwise). Credits start as a reserved estimate and\nsettle to the provider's reported cost within minutes; the activity log updates when they do.\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## Endpoints\n| Family | Endpoints |\n|---|---|\n| Chat | `POST /chat/completions` (`store: true` keeps it 30 days: `GET /chat/completions`, `GET`/`POST`/`DELETE /chat/completions/{id}`, `GET /chat/completions/{id}/messages`), `POST /completions` |\n| 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}`, `POST /responses/{id}/cancel`, `GET /responses/{id}/input_items`, `POST /responses/input_tokens`, `POST /responses/compact`, and a WebSocket at `GET /responses` |\n| Conversations | `POST /conversations`, `GET`/`POST`/`DELETE /conversations/{id}`, `POST`/`GET /conversations/{id}/items`, `GET`/`DELETE /conversations/{id}/items/{item_id}` |\n| Embeddings | `POST /embeddings` (`text-embedding-3-small`, `text-embedding-3-large`, `text-embedding-ada-002`) |\n| Audio | `POST /audio/speech`, `POST /audio/transcriptions`, `POST /audio/translations` |\n| Moderations | `POST /moderations` |\n| Decisions | `POST /decisions` (typed answers: a probability, a choice or a score; OpenAI's beta shape) |\n| Images | `POST /images/generations`, `POST /images/edits`, `POST /images/variations` |\n| Files | `POST /files`, `GET /files`, `GET`/`DELETE /files/{id}`, `GET /files/{id}/content` |\n| Batches | `POST /batches`, `GET /batches`, `GET /batches/{id}`, `POST /batches/{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, images) before answering.\n* The whole conversation you send is used; 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, and requests per minute.\nA reached limit returns `429` with type `insufficient_quota`. Up to 6 requests run at once per account.\n\n## Errors\nErrors use OpenAI's shape: `{\"error\": {\"message\", \"type\", \"param\", \"code\"}}`.\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` 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; files at `/mnt/data`; outputs as `code_interpreter_call` items (`include: [\"code_interpreter_call.outputs\"]` for logs), new files cited with `container_file_citation` |\n| `shell` | Code interpreter (containers); Function calling (`local`) | Bash in the same kind of container (`container_auto` or `container_reference`); `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` (`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 your vector stores; `file_search_call` items (`include: [\"file_search_call.results\"]`), `file_citation` annotations |\n| `image_generation` | Image generation | `image_generation_call` items with the image as base64 |\n| `mcp` | Remote MCP servers | Tools on a public `https://` MCP server (Streamable HTTP). Calls need your approval unless `require_approval` says `never`: answer an `mcp_approval_request` with an `mcp_approval_response` and `previous_response_id`. Headers and `authorization` go to the server only and are never stored. |\n\nContainers have no network, expire after 20 minutes without use (`expires_after`, up to 60), hold up to 64 MB and\n1,000 files, and run each program for up to 30 seconds. Skills mount read-only at `/mnt/skills/<name>`.\n",
  "contact": {
   "name": "Dyadic",
   "url": "https://dyadic.app/"
  },
  "license": {
   "name": "Dyadic terms",
   "url": "https://dyadic.app/"
  }
 },
 "servers": [
  {
   "url": "https://dyadic.app/api/openai/v1",
   "description": "Production"
  }
 ],
 "x-dyadic-capabilities": {
  "contract": "openai-compatible-subset",
  "version": "1.1.0",
  "url": "https://dyadic.app/api/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."
  },
  {
   "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."
  },
  {
   "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."
  }
 ],
 "paths": {
  "/models": {
   "get": {
    "tags": [
     "Discovery"
    ],
    "operationId": "listModels",
    "summary": "List models",
    "description": "The models this key may use (its agents, plus -think variants when allowed).",
    "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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/models/{model}": {
   "get": {
    "tags": [
     "Discovery"
    ],
    "operationId": "retrieveModel",
    "summary": "Retrieve a model",
    "parameters": [
     {
      "name": "model",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "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"
       ]
      }
     }
    ],
    "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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]`.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ChatCompletionRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The completion (or an event stream when `stream` is true)",
      "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, 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, 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"
         }
        }
       }
      }
     },
     "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": [
     "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",
     "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"
         }
        }
       }
      }
     }
    },
    "description": "Completions created with store: true, for 30 days. Filter with model and metadata[key]=value.",
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     },
     {
      "name": "model",
      "in": "query",
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   },
   "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/completions": {
   "post": {
    "tags": [
     "Completions"
    ],
    "operationId": "createCompletion",
    "summary": "Create a text completion",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CompletionRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The completion",
      "content": {
       "application/json": {
        "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, 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, 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"
         }
        }
       }
      }
     },
     "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": [
     "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": [
     "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)",
      "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, 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, 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"
         }
        }
       }
      }
     },
     "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.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ResponseRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "background",
     "conversation",
     "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",
     "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), 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.",
    "responses": {
     "101": {
      "description": "Switching to WebSocket"
     },
     "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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"
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   },
   "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "description": "Stops a queued or running background response; it comes back with status cancelled. 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, 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, 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"
         }
        }
       }
      }
     }
    },
    "description": "An estimate (about four bytes of text per token, a fixed amount per image and message, and the agent's own instructions). 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",
     "web_search",
     "web_search_preview",
     "web_search_2025_08_26",
     "web_search_preview_2025_03_11",
     "code_interpreter",
     "shell",
     "file_search",
     "image_generation",
     "mcp"
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     },
     "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": "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   },
   "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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": "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "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"
        ]
       }
      }
     }
    ],
    "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     },
     {
      "name": "include",
      "in": "query",
      "schema": {
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "message.output_text.logprobs",
         "message.input_image.image_url"
        ]
       }
      }
     }
    ]
   }
  },
  "/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/ResponseInputItem"
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "include",
      "in": "query",
      "schema": {
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "message.output_text.logprobs",
         "message.input_image.image_url"
        ]
       }
      }
     }
    ]
   },
   "delete": {
    "tags": [
     "Conversations"
    ],
    "operationId": "deleteConversationItem",
    "summary": "Delete an item",
    "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"
         }
        }
       }
      }
     },
     "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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     },
     "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/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). It is also added to your Workspace image library.",
    "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, 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, 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"
         }
        }
       }
      }
     },
     "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": [
     "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, 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, 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"
         }
        }
       }
      }
     },
     "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). Also added to your Workspace image library.",
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/ImageEditRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "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, 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, 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"
         }
        }
       }
      }
     },
     "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/ImageVariationRequest"
       }
      }
     }
    },
    "x-dyadic-fields": [
     "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, 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, 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"
         }
        }
       }
      }
     }
    },
    "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, 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, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "purpose",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   },
   "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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",
      "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "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.",
    "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, 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, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100
      }
     },
     {
      "name": "after",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Cursor: the last id of the previous page."
     }
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "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, 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, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   },
   "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "description": "Multipart `file`, or JSON `{\"file_id\"}` to copy a file uploaded with POST /files.",
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "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, 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, 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"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   },
   "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "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, 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, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   },
   "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, 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, 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"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreRequest"
       }
      }
     }
    },
    "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     },
     "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": "Embeds the query (billed like /embeddings) and ranks the store's 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, 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, 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"
         }
        }
       }
      }
     }
    },
    "description": "Text files are chunked and embedded (billed like /embeddings); other files fail with unsupported_file.",
    "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, 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, 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"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     },
     {
      "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, 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, 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"
         }
        }
       }
      }
     }
    }
   },
   "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, 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, 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"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VectorStoreFileRequest"
       }
      }
     }
    },
    "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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": "The chunks",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "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, 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, model or permission not allowed, IP not allowed).",
          "type": "permission_error",
          "param": null,
          "code": "model_not_allowed"
         }
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 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"
       ]
      }
     }
    ]
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    }
   },
   "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, 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, 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"
         }
        }
       }
      }
     }
    },
    "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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 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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, 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, 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"
         }
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/SkillUpload"
       }
      }
     }
    },
    "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, or latest."
    }
   ],
   "get": {
    "tags": [
     "Skills"
    ],
    "operationId": "retrieveSkillVersion",
    "summary": "Retrieve a version",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SkillVersion"
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Skills"
    ],
    "operationId": "deleteSkillVersion",
    "summary": "Delete a version",
    "responses": {
     "200": {
      "description": "Deleted",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  },
  "/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, or latest."
    }
   ],
   "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"
        }
       }
      }
     },
     "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, 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, 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"
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearerAuth": {
    "type": "http",
    "scheme": "bearer",
    "bearerFormat": "dya-...",
    "description": "A Dyadic API key from dyadic.app/workspace."
   }
  },
  "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",
      "enum": [
       "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": {
        "const": "text"
       },
       "text": {
        "type": "string"
       }
      }
     },
     {
      "type": "object",
      "required": [
       "type",
       "image_url"
      ],
      "properties": {
       "type": {
        "const": "image_url"
       },
       "image_url": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "An https URL or a data:image/... URL."
         },
         "detail": {
          "type": "string",
          "enum": [
           "auto",
           "low",
           "high"
          ]
         }
        }
       }
      }
     },
     {
      "type": "object",
      "required": [
       "type",
       "file"
      ],
      "properties": {
       "type": {
        "const": "file"
       },
       "file": {
        "type": "object",
        "properties": {
         "file_id": {
          "type": "string",
          "description": "A file from POST /files."
         },
         "filename": {
          "type": "string"
         },
         "file_data": {
          "type": "string",
          "description": "A data: URL (PDF or text)."
         }
        }
       }
      }
     },
     {
      "type": "object",
      "required": [
       "type",
       "input_audio"
      ],
      "properties": {
       "type": {
        "const": "input_audio"
       },
       "input_audio": {
        "type": "object",
        "properties": {
         "data": {
          "type": "string",
          "description": "Base64 audio."
         },
         "format": {
          "type": "string",
          "enum": [
           "wav",
           "mp3"
          ]
         }
        }
       }
      }
     }
    ]
   },
   "ChatMessage": {
    "type": "object",
    "required": [
     "role"
    ],
    "properties": {
     "role": {
      "type": "string",
      "enum": [
       "system",
       "developer",
       "user",
       "assistant",
       "tool"
      ]
     },
     "content": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ContentPart"
        }
       },
       {
        "type": "null"
       }
      ]
     },
     "name": {
      "type": "string"
     },
     "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",
      "enum": [
       "iris",
       "iris-think"
      ],
      "example": "iris"
     },
     "messages": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ChatMessage"
      },
      "minItems": 1,
      "maxItems": 1000
     },
     "tools": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Tool"
      },
      "maxItems": 128,
      "description": "Functions the model may call. Needs the key's Function calling permission."
     },
     "tool_choice": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none",
         "required"
        ]
       },
       {
        "type": "object"
       }
      ]
     },
     "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."
     },
     "function_call": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none"
        ]
       },
       {
        "type": "object"
       }
      ],
      "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."
       }
      },
      "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
      },
      "maxProperties": 16
     },
     "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
      },
      "description": "Token ID to bias (-100 to 100), up to 300 entries."
     },
     "max_tokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 32000,
      "default": 4096,
      "description": "Output token cap (also capped by the key's own limit)."
     },
     "max_completion_tokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 32000,
      "description": "Alias of max_tokens."
     },
     "stop": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "string"
        },
        "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"
       }
      },
      "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."
     }
    },
    "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."
     }
    }
   },
   "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"
     },
     "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"
     },
     "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",
      "enum": [
       "iris",
       "iris-think"
      ]
     },
     "prompt": {
      "type": "string"
     },
     "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
      },
      "description": "Token ID to bias (-100 to 100), up to 300 entries."
     },
     "max_tokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 32000,
      "default": 4096,
      "description": "Output token cap (also capped by the key's own limit)."
     },
     "max_completion_tokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 32000,
      "description": "Alias of max_tokens."
     },
     "stop": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "string"
        },
        "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"
       }
      },
      "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."
     }
    },
    "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"
        },
        "logprobs": {
         "type": [
          "object",
          "null"
         ]
        }
       }
      }
     },
     "usage": {
      "$ref": "#/components/schemas/Usage"
     },
     "dyadic": {
      "$ref": "#/components/schemas/BillingInfo"
     }
    }
   },
   "ImageRequest": {
    "type": "object",
    "required": [
     "prompt"
    ],
    "properties": {
     "prompt": {
      "type": "string",
      "maxLength": 4000
     },
     "model": {
      "type": "string",
      "enum": [
       "iris"
      ],
      "description": "Which agent bills it."
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "size": {
      "type": "string",
      "example": "1024x1024",
      "description": "Sets the aspect ratio."
     },
     "quality": {
      "type": "string",
      "enum": [
       "standard",
       "hd",
       "high",
       "max"
      ]
     },
     "response_format": {
      "type": "string",
      "enum": [
       "b64_json",
       "url"
      ]
     }
    },
    "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"
        }
       }
      }
     }
    }
   },
   "ResponseRequest": {
    "type": "object",
    "required": [
     "model",
     "input"
    ],
    "properties": {
     "model": {
      "type": "string",
      "enum": [
       "iris",
       "iris-think"
      ],
      "example": "iris"
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ResponseInputItem"
        }
       }
      ]
     },
     "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: its input and output come first."
     },
     "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",
          "web_search",
          "web_search_preview",
          "code_interpreter",
          "shell",
          "file_search",
          "image_generation",
          "mcp"
         ]
        },
        "name": {
         "type": "string"
        },
        "description": {
         "type": "string"
        },
        "parameters": {
         "type": "object"
        },
        "strict": {
         "type": "boolean"
        },
        "container": {
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "object",
           "properties": {
            "type": {
             "const": "auto"
            },
            "file_ids": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "memory_limit": {
             "type": "string",
             "enum": [
              "1g"
             ]
            },
            "skills": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/SkillReference"
             }
            }
           }
          }
         ]
        },
        "environment": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string",
           "enum": [
            "container_auto",
            "container_reference",
            "local"
           ]
          },
          "container_id": {
           "type": "string"
          },
          "skills": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/SkillReference"
           }
          }
         }
        },
        "vector_store_ids": {
         "type": "array",
         "items": {
          "type": "string"
         },
         "maxItems": 2
        },
        "max_num_results": {
         "type": "integer",
         "minimum": 1,
         "maximum": 50
        },
        "filters": {
         "type": "object"
        },
        "ranking_options": {
         "type": "object",
         "properties": {
          "score_threshold": {
           "type": "number",
           "minimum": 0,
           "maximum": 1
          }
         }
        },
        "server_label": {
         "type": "string"
        },
        "server_url": {
         "type": "string",
         "format": "uri",
         "description": "A public https:// address."
        },
        "server_description": {
         "type": "string"
        },
        "headers": {
         "type": "object",
         "additionalProperties": {
          "type": "string"
         }
        },
        "authorization": {
         "type": "string"
        },
        "allowed_tools": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "require_approval": {
         "oneOf": [
          {
           "type": "string",
           "enum": [
            "always",
            "never"
           ]
          },
          {
           "type": "object"
          }
         ],
         "default": "always"
        }
       }
      }
     },
     "tool_choice": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none",
         "required"
        ]
       },
       {
        "type": "object"
       }
      ]
     },
     "parallel_tool_calls": {
      "type": "boolean"
     },
     "text": {
      "type": "object",
      "properties": {
       "format": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "enum": [
           "text",
           "json_object",
           "json_schema"
          ]
         },
         "name": {
          "type": "string"
         },
         "schema": {
          "type": "object"
         },
         "strict": {
          "type": "boolean"
         }
        }
       }
      }
     },
     "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."
       },
       "summary": {
        "type": "string"
       }
      }
     },
     "max_output_tokens": {
      "type": "integer",
      "minimum": 16,
      "maximum": 32000
     },
     "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",
        "code_interpreter_call.outputs",
        "file_search_call.results"
       ]
      }
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "maxProperties": 16
     },
     "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."
     },
     "background": {
      "type": "boolean",
      "default": false,
      "description": "Answer at once with status queued and run in the background: poll GET /responses/{id}, cancel with POST /responses/{id}/cancel. Not with stream or store: false."
     },
     "service_tier": {
      "type": "string",
      "enum": [
       "auto",
       "default"
      ]
     },
     "truncation": {
      "type": "string",
      "enum": [
       "disabled"
      ]
     }
    },
    "example": {
     "model": "iris",
     "instructions": "Be concise.",
     "input": "What changed in AI this week?"
    }
   },
   "ResponseInputItem": {
    "type": "object",
    "description": "A message ({role, content}), function_call or function_call_output item.",
    "properties": {
     "type": {
      "type": "string",
      "enum": [
       "message",
       "function_call",
       "function_call_output",
       "mcp_approval_response"
      ]
     },
     "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": {
           "type": "string"
          },
          "image_url": {
           "type": "string"
          },
          "file_id": {
           "type": "string"
          },
          "file_data": {
           "type": "string"
          },
          "filename": {
           "type": "string"
          }
         }
        }
       }
      ]
     },
     "call_id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "arguments": {
      "type": "string"
     },
     "output": {
      "type": "string"
     },
     "approval_request_id": {
      "type": "string"
     },
     "approve": {
      "type": "boolean"
     }
    }
   },
   "Response": {
    "type": "object",
    "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",
          "code_interpreter_call",
          "shell_call",
          "shell_call_output",
          "file_search_call",
          "image_generation_call",
          "mcp_list_tools",
          "mcp_call",
          "mcp_approval_request"
         ]
        },
        "id": {
         "type": "string"
        },
        "role": {
         "type": "string"
        },
        "content": {
         "type": "array",
         "items": {
          "type": "object"
         }
        },
        "call_id": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "arguments": {
         "type": "string"
        }
       }
      }
     },
     "output_text": {
      "type": "string",
      "description": "All output text joined (SDK convenience)."
     },
     "previous_response_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "error": {
      "type": [
       "object",
       "null"
      ]
     },
     "incomplete_details": {
      "type": [
       "object",
       "null"
      ]
     },
     "metadata": {
      "type": "object"
     },
     "usage": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "input_tokens": {
        "type": "integer"
       },
       "output_tokens": {
        "type": "integer"
       },
       "total_tokens": {
        "type": "integer"
       }
      }
     }
    }
   },
   "ResponseStreamEvent": {
    "type": "object",
    "required": [
     "type",
     "sequence_number"
    ],
    "properties": {
     "type": {
      "type": "string",
      "examples": [
       "response.created",
       "response.output_text.delta",
       "response.completed"
      ]
     },
     "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",
      "enum": [
       "iris",
       "iris-think"
      ],
      "example": "iris"
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ResponseInputItem"
        }
       }
      ]
     },
     "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: its input and output come first."
     },
     "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."
     },
     "tools": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string",
         "enum": [
          "function",
          "web_search",
          "web_search_preview",
          "code_interpreter",
          "shell",
          "file_search",
          "image_generation",
          "mcp"
         ]
        },
        "name": {
         "type": "string"
        },
        "description": {
         "type": "string"
        },
        "parameters": {
         "type": "object"
        },
        "strict": {
         "type": "boolean"
        },
        "container": {
         "oneOf": [
          {
           "type": "string"
          },
          {
           "type": "object",
           "properties": {
            "type": {
             "const": "auto"
            },
            "file_ids": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "memory_limit": {
             "type": "string",
             "enum": [
              "1g"
             ]
            },
            "skills": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/SkillReference"
             }
            }
           }
          }
         ]
        },
        "environment": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string",
           "enum": [
            "container_auto",
            "container_reference",
            "local"
           ]
          },
          "container_id": {
           "type": "string"
          },
          "skills": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/SkillReference"
           }
          }
         }
        },
        "vector_store_ids": {
         "type": "array",
         "items": {
          "type": "string"
         },
         "maxItems": 2
        },
        "max_num_results": {
         "type": "integer",
         "minimum": 1,
         "maximum": 50
        },
        "filters": {
         "type": "object"
        },
        "ranking_options": {
         "type": "object",
         "properties": {
          "score_threshold": {
           "type": "number",
           "minimum": 0,
           "maximum": 1
          }
         }
        },
        "server_label": {
         "type": "string"
        },
        "server_url": {
         "type": "string",
         "format": "uri",
         "description": "A public https:// address."
        },
        "server_description": {
         "type": "string"
        },
        "headers": {
         "type": "object",
         "additionalProperties": {
          "type": "string"
         }
        },
        "authorization": {
         "type": "string"
        },
        "allowed_tools": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "require_approval": {
         "oneOf": [
          {
           "type": "string",
           "enum": [
            "always",
            "never"
           ]
          },
          {
           "type": "object"
          }
         ],
         "default": "always"
        }
       }
      }
     },
     "tool_choice": {
      "oneOf": [
       {
        "type": "string",
        "enum": [
         "auto",
         "none",
         "required"
        ]
       },
       {
        "type": "object"
       }
      ]
     },
     "parallel_tool_calls": {
      "type": "boolean"
     },
     "text": {
      "type": "object",
      "properties": {
       "format": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "enum": [
           "text",
           "json_object",
           "json_schema"
          ]
         },
         "name": {
          "type": "string"
         },
         "schema": {
          "type": "object"
         },
         "strict": {
          "type": "boolean"
         }
        }
       }
      }
     },
     "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."
       },
       "summary": {
        "type": "string"
       }
      }
     },
     "truncation": {
      "type": "string",
      "enum": [
       "disabled"
      ]
     }
    }
   },
   "InputTokens": {
    "type": "object",
    "properties": {
     "object": {
      "const": "response.input_tokens"
     },
     "input_tokens": {
      "type": "integer"
     }
    }
   },
   "CompactRequest": {
    "type": "object",
    "properties": {
     "model": {
      "type": "string",
      "enum": [
       "iris",
       "iris-think"
      ],
      "example": "iris"
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ResponseInputItem"
        }
       }
      ]
     },
     "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: its input and output come first."
     }
    }
   },
   "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 compaction item."
     },
     "usage": {
      "type": "object"
     }
    }
   },
   "Conversation": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "conversation"
     },
     "created_at": {
      "type": "integer"
     },
     "metadata": {
      "type": "object"
     }
    }
   },
   "ConversationRequest": {
    "type": "object",
    "properties": {
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ResponseInputItem"
      },
      "maxItems": 20
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "maxProperties": 16
     }
    }
   },
   "ConversationUpdate": {
    "type": "object",
    "required": [
     "metadata"
    ],
    "properties": {
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "maxLength": 512
      },
      "maxProperties": 16
     }
    }
   },
   "ConversationItems": {
    "type": "object",
    "required": [
     "items"
    ],
    "properties": {
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ResponseInputItem"
      },
      "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/ResponseInputItem"
      }
     },
     "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"
         ]
        },
        "content_parts": {
         "type": [
          "array",
          "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"
      ]
     },
     "input": {
      "oneOf": [
       {
        "type": "string",
        "maxLength": 32000
       },
       {
        "type": "array",
        "items": {
         "type": "string"
        },
        "maxItems": 2048
       }
      ]
     },
     "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",
     "voice"
    ],
    "properties": {
     "model": {
      "type": "string",
      "enum": [
       "iris-voice",
       "tts-1",
       "tts-1-hd",
       "gpt-4o-mini-tts",
       "gpt-4o-tts"
      ]
     },
     "input": {
      "type": "string",
      "maxLength": 4096
     },
     "voice": {
      "type": "string",
      "enum": [
       "alloy",
       "ash",
       "ballad",
       "coral",
       "echo",
       "fable",
       "nova",
       "onyx",
       "sage",
       "shimmer",
       "verse",
       "marin",
       "cedar"
      ]
     },
     "response_format": {
      "type": "string",
      "enum": [
       "mp3",
       "wav",
       "pcm"
      ],
      "default": "mp3"
     },
     "speed": {
      "type": "number",
      "minimum": 0.25,
      "maximum": 4
     }
    },
    "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"
     },
     "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "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
     }
    }
   },
   "Transcription": {
    "type": "object",
    "properties": {
     "text": {
      "type": "string"
     },
     "language": {
      "type": "string"
     },
     "duration": {
      "type": "number"
     },
     "segments": {
      "type": "array",
      "items": {
       "type": "object"
      }
     },
     "words": {
      "type": "array",
      "items": {
       "type": "object"
      }
     },
     "usage": {
      "type": "object"
     }
    }
   },
   "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"
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "string"
        },
        "maxItems": 32
       },
       {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/ContentPart"
        }
       }
      ]
     }
    },
    "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",
      "default": "typesafe/jev-1.14",
      "description": "typesafe/jev-1.14 or another decision model on OpenRouter (~typesafe/jev-latest), or gpt-6-luna (OpenAI)."
     },
     "input": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "role": {
           "type": "string",
           "enum": [
            "user"
           ]
          },
          "content": {
           "type": "array",
           "items": {
            "type": "object"
           }
          }
         }
        }
       }
      ]
     },
     "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"
        },
        "instructions": {
         "type": "string"
        },
        "choices": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "description"
          ],
          "properties": {
           "value": {
            "type": "string"
           },
           "label": {
            "type": "string"
           },
           "description": {
            "type": "string"
           }
          }
         }
        },
        "levels": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "description"
          ],
          "properties": {
           "value": {
            "type": "string"
           },
           "label": {
            "type": "string"
           },
           "description": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    },
    "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"
     },
     "model": {
      "type": "string"
     },
     "answers": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string",
         "enum": [
          "predicate",
          "choice",
          "score",
          "refusal"
         ]
        },
        "name": {
         "type": "string"
        },
        "probability": {
         "type": "number"
        },
        "choice": {
         "type": "string"
        },
        "score": {
         "type": "number"
        },
        "confidence": {
         "type": "number"
        },
        "probabilities": {
         "type": "array",
         "items": {
          "type": "object"
         }
        }
       }
      }
     }
    }
   },
   "ImageEditRequest": {
    "type": "object",
    "required": [
     "image",
     "prompt"
    ],
    "properties": {
     "image": {
      "type": "string",
      "format": "binary",
      "description": "PNG, JPEG, WebP or GIF up to 8 MB."
     },
     "prompt": {
      "type": "string",
      "maxLength": 4000
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "size": {
      "type": "string"
     },
     "quality": {
      "type": "string",
      "enum": [
       "standard",
       "hd",
       "high",
       "max"
      ]
     },
     "response_format": {
      "type": "string",
      "enum": [
       "b64_json",
       "url"
      ]
     }
    }
   },
   "ImageVariationRequest": {
    "type": "object",
    "required": [
     "image"
    ],
    "properties": {
     "image": {
      "type": "string",
      "format": "binary",
      "description": "PNG, JPEG, WebP or GIF up to 8 MB."
     },
     "n": {
      "type": "integer",
      "enum": [
       1
      ]
     },
     "size": {
      "type": "string"
     },
     "quality": {
      "type": "string",
      "enum": [
       "standard",
       "hd",
       "high",
       "max"
      ]
     },
     "response_format": {
      "type": "string",
      "enum": [
       "b64_json",
       "url"
      ]
     }
    }
   },
   "FileUploadRequest": {
    "type": "object",
    "required": [
     "file",
     "purpose"
    ],
    "properties": {
     "file": {
      "type": "string",
      "format": "binary",
      "description": "Up to 20 MB (100 MB for batch .jsonl files)."
     },
     "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"
     },
     "status": {
      "type": "string"
     },
     "expires_at": {
      "type": [
       "integer",
       "null"
      ]
     }
    }
   },
   "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",
     "completion_window"
    ],
    "properties": {
     "input_file_id": {
      "type": "string",
      "description": "A .jsonl file uploaded with purpose batch: one {custom_id, method: POST, url, body} per line."
     },
     "endpoint": {
      "type": "string",
      "enum": [
       "/v1/chat/completions",
       "/v1/completions",
       "/v1/embeddings",
       "/v1/responses",
       "/v1/moderations"
      ]
     },
     "completion_window": {
      "type": "string",
      "enum": [
       "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",
       "canceling",
       "cancelled"
      ]
     },
     "input_file_id": {
      "type": "string"
     },
     "output_file_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "error_file_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "errors": {
      "type": [
       "object",
       "null"
      ]
     },
     "completion_window": {
      "type": "string"
     },
     "request_counts": {
      "type": "object",
      "properties": {
       "total": {
        "type": "integer"
       },
       "completed": {
        "type": "integer"
       },
       "failed": {
        "type": "integer"
       }
      }
     },
     "created_at": {
      "type": "integer"
     },
     "in_progress_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "completed_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "expires_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"
     }
    }
   },
   "SkillReference": {
    "type": "object",
    "required": [
     "skill_id"
    ],
    "properties": {
     "type": {
      "const": "skill_reference"
     },
     "skill_id": {
      "type": "string"
     },
     "version": {
      "oneOf": [
       {
        "type": "integer"
       },
       {
        "type": "string",
        "enum": [
         "latest"
        ]
       }
      ]
     }
    }
   },
   "ContainerRequest": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 200
     },
     "file_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "maxItems": 50
     },
     "expires_after": {
      "type": "object",
      "properties": {
       "anchor": {
        "const": "last_active_at"
       },
       "minutes": {
        "type": "integer",
        "minimum": 1,
        "maximum": 60
       }
      }
     },
     "memory_limit": {
      "type": "string",
      "enum": [
       "1g"
      ]
     },
     "skills": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/SkillReference"
      }
     }
    }
   },
   "Container": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "cntr_..."
     },
     "object": {
      "const": "container"
     },
     "created_at": {
      "type": "integer"
     },
     "status": {
      "type": "string",
      "enum": [
       "running",
       "expired"
      ]
     },
     "expires_after": {
      "type": "object"
     },
     "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"
      ]
     }
    }
   },
   "ContainerFileUpload": {
    "type": "object",
    "properties": {
     "file": {
      "type": "string",
      "format": "binary",
      "description": "Up to 20 MB."
     }
    }
   },
   "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"
     }
    }
   },
   "VectorStoreRequest": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 256
     },
     "file_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "maxItems": 100
     },
     "expires_after": {
      "type": "object",
      "properties": {
       "anchor": {
        "const": "last_active_at"
       },
       "days": {
        "type": "integer",
        "minimum": 1,
        "maximum": 365
       }
      }
     },
     "chunking_strategy": {
      "type": "object",
      "description": "{type: auto} (800 tokens, 400 overlap) or {type: static, static: {max_chunk_size_tokens, chunk_overlap_tokens}}."
     },
     "metadata": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      },
      "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"
     },
     "status": {
      "type": "string",
      "enum": [
       "in_progress",
       "completed",
       "expired"
      ]
     },
     "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 text file uploaded with POST /files."
     },
     "attributes": {
      "type": "object",
      "maxProperties": 16
     },
     "chunking_strategy": {
      "type": "object"
     }
    }
   },
   "VectorStoreFile": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "vector_store.file"
     },
     "usage_bytes": {
      "type": "integer"
     },
     "created_at": {
      "type": "integer"
     },
     "vector_store_id": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "in_progress",
       "completed",
       "failed",
       "cancelled"
      ]
     },
     "last_error": {
      "type": [
       "object",
       "null"
      ]
     },
     "attributes": {
      "type": "object"
     },
     "chunking_strategy": {
      "type": "object"
     }
    }
   },
   "VectorStoreFileBatchRequest": {
    "type": "object",
    "properties": {
     "file_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "maxItems": 500
     },
     "files": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/VectorStoreFileRequest"
      },
      "maxItems": 500
     },
     "attributes": {
      "type": "object"
     },
     "chunking_strategy": {
      "type": "object"
     }
    }
   },
   "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"
     },
     "file_counts": {
      "type": "object"
     }
    }
   },
   "VectorStoreSearchRequest": {
    "type": "object",
    "required": [
     "query"
    ],
    "properties": {
     "query": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "string"
        }
       }
      ]
     },
     "max_num_results": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 10
     },
     "filters": {
      "type": "object"
     },
     "ranking_options": {
      "type": "object",
      "properties": {
       "score_threshold": {
        "type": "number"
       }
      }
     },
     "rewrite_query": {
      "type": "boolean"
     }
    }
   },
   "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"
     },
     "next_page": {
      "type": [
       "string",
       "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 (SKILL.md with name and description front matter; each file named by its path), or one zip. Up to 500 files, 25 MB unpacked."
     },
     "default": {
      "type": "string",
      "enum": [
       "true",
       "false"
      ],
      "description": "New versions: make this the default."
     }
    }
   },
   "Skill": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "skill_..."
     },
     "object": {
      "const": "skill"
     },
     "name": {
      "type": "string"
     },
     "description": {
      "type": "string"
     },
     "created_at": {
      "type": "integer"
     },
     "default_version": {
      "type": "integer"
     },
     "latest_version": {
      "type": "integer"
     }
    }
   },
   "SkillVersion": {
    "type": "object",
    "properties": {
     "object": {
      "const": "skill.version"
     },
     "skill_id": {
      "type": "string"
     },
     "version": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "description": {
      "type": "string"
     },
     "created_at": {
      "type": "integer"
     },
     "bytes": {
      "type": "integer"
     },
     "files": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    }
   },
   "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": {
      "type": "integer"
     }
    }
   }
  }
 }
}