{
  "components": {
    "headers": {
      "Idempotent-Replayed": {
        "description": "`true` when this answer is the stored result of an earlier request with the same `Idempotency-Key`.",
        "schema": {
          "enum": [
            "true"
          ],
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "On every `429` and `503`: whole seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        }
      },
      "x-ratelimit-limit-requests": {
        "description": "The key's requests-per-minute limit for this kind of request.",
        "schema": {
          "type": "integer"
        }
      },
      "x-ratelimit-remaining-requests": {
        "description": "Requests left in the current minute.",
        "schema": {
          "type": "integer"
        }
      },
      "x-ratelimit-reset-requests": {
        "description": "Time until the window resets, as `59s` or `1m0s`.",
        "schema": {
          "type": "string"
        }
      },
      "x-request-id": {
        "description": "`req_` and 32 lowercase hex digits. Quote it when you report a problem.",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "description": "Makes a retry safe. A repeat of the same request answers with the stored result and `Idempotent-Replayed: true`, and is never charged again; the same key on a different request is `idempotency_key_reused`. Without it, a retry is a new, charged request.",
        "in": "header",
        "name": "Idempotency-Key",
        "required": false,
        "schema": {
          "maxLength": 255,
          "minLength": 1,
          "pattern": "^[ -~]+$",
          "type": "string"
        }
      },
      "Jurisdiction": {
        "description": "The countries whose law is read, comma-separated, in any case and spacing; `hu` without it. Allowed: `at`, `be`, `ch`, `cz`, `de`, `dk`, `es`, `fi`, `fr`, `gb`, `ge`, `hr`, `hu`, `ie`, `it`, `li`, `lu`, `mc`, `nl`, `no`, `pl`, `pt`, `ro`, `rs`, `se`, `si`, `sk`. Any other code, `us`, `oecd` and `ifrs` included, is `unsupported_jurisdiction`.",
        "in": "header",
        "name": "X-Jurisdiction",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "ResponseId": {
        "description": "The `id` of a response of this key.",
        "in": "path",
        "name": "response_id",
        "required": true,
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      }
    },
    "schemas": {
      "ActRef": {
        "description": "The act a provision belongs to.",
        "properties": {
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "short_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "description": "Empty when the act has none.",
            "type": "string"
          }
        },
        "required": [
          "title",
          "short_title",
          "identifier"
        ],
        "title": "ActRef",
        "type": "object"
      },
      "Cost": {
        "description": "An amount billed, in the account's currency.",
        "properties": {
          "amount": {
            "description": "Two decimals, as a string.",
            "pattern": "^\\d+\\.\\d{2}$",
            "type": "string"
          },
          "currency": {
            "enum": [
              "EUR",
              "HUF"
            ],
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "title": "Cost",
        "type": "object"
      },
      "CreateResponseBody": {
        "description": "The body of `createResponse`. Fields it does not name, such as `temperature`, are accepted and ignored.",
        "properties": {
          "background": {
            "default": false,
            "description": "Answer `202` with the response queued, to be polled. Exactly one of `stream` and `background` must be `true`.",
            "type": "boolean"
          },
          "conversation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Not supported: refused with `unsupported_parameter`."
          },
          "depth": {
            "default": "standard",
            "description": "`deep` may research further before it answers, and is priced higher; `standard` never runs deep web research. Echoed on the response.",
            "enum": [
              "standard",
              "deep"
            ],
            "type": "string"
          },
          "input": {
            "description": "The question as a string, or the whole conversation as items whose last item has the role `user`. Only the most recent turns are used. A string, or an item's `content`, is at most 50,000 characters.",
            "oneOf": [
              {
                "maxLength": 50000,
                "minLength": 1,
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/InputItem"
                },
                "minItems": 1,
                "type": "array"
              }
            ]
          },
          "model": {
            "default": "azta-agent",
            "description": "A label, echoed back on the response. It selects nothing.",
            "type": "string"
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Not supported: refused with `unsupported_parameter`."
          },
          "stream": {
            "default": false,
            "description": "Answer as server-sent events. Exactly one of `stream` and `background` must be `true`.",
            "type": "boolean"
          }
        },
        "required": [
          "input"
        ],
        "title": "CreateResponseBody",
        "type": "object"
      },
      "ErrorBody": {
        "description": "The body of every 4xx and 5xx this API answers with: OpenAI's error object, with no\nresponse envelope.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorObject"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorBody",
        "type": "object"
      },
      "ErrorObject": {
        "description": "What a refused request says. Branch on `code`; `message` is English and names no\ninternal detail.",
        "properties": {
          "code": {
            "enum": [
              "invalid_request",
              "unsupported_parameter",
              "unsupported_jurisdiction",
              "idempotency_key_reused",
              "invalid_api_key",
              "insufficient_credits",
              "spend_cap_reached",
              "account_suspended",
              "not_found",
              "idempotency_key_in_use",
              "response_finished",
              "rate_limit_exceeded",
              "concurrency_limit_exceeded",
              "server_error",
              "ledger_unavailable"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The field or header at fault, or null when no one is."
          },
          "type": {
            "enum": [
              "invalid_request_error",
              "authentication_error",
              "billing_error",
              "permission_error",
              "not_found_error",
              "rate_limit_error",
              "server_error"
            ],
            "type": "string"
          }
        },
        "required": [
          "message",
          "type",
          "param",
          "code"
        ],
        "title": "ErrorObject",
        "type": "object"
      },
      "FetchList": {
        "description": "The answer to `POST /v1/provisions/fetch`.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FetchedProvision"
            },
            "type": "array"
          },
          "not_found": {
            "description": "The requested `ids` that were not read, in request order. They cost nothing.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "object": {
            "const": "list",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/LookupUsage"
          }
        },
        "required": [
          "object",
          "data",
          "not_found",
          "usage"
        ],
        "title": "FetchList",
        "type": "object"
      },
      "FetchedProvision": {
        "description": "A provision as `POST /v1/provisions/fetch` returns it, with its text.",
        "properties": {
          "act": {
            "$ref": "#/components/schemas/ActRef"
          },
          "as_of": {
            "description": "The day whose version was read.",
            "format": "date",
            "type": "string"
          },
          "country": {
            "description": "A lower-case country code.",
            "type": "string"
          },
          "excerpt": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "At most 300 characters, whitespace collapsed."
          },
          "kind": {
            "const": "provision",
            "type": "string"
          },
          "section": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "description": "The provision and its subsections, cut to 20,000 characters.",
            "type": "string"
          },
          "title": {
            "description": "A display label: the act's short title, then the section.",
            "type": "string"
          },
          "truncated": {
            "description": "Whether `text` was cut.",
            "type": "boolean"
          },
          "unit_id": {
            "description": "A provision's id, the same across versions and re-ingestion: pass it to `POST /v1/provisions/fetch`. A Hungarian id is `hu:njt:<njt id>:<path>`.",
            "type": "string"
          },
          "url": {
            "description": "An absolute URL, always present.",
            "format": "uri",
            "type": "string"
          },
          "url_kind": {
            "description": "`official` is the publisher's own page, `viewer` our provision or document viewer.",
            "enum": [
              "official",
              "viewer"
            ],
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VersionRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version read. Null for a version that never commenced."
          }
        },
        "required": [
          "title",
          "section",
          "url",
          "excerpt",
          "kind",
          "unit_id",
          "act",
          "country",
          "version",
          "url_kind",
          "text",
          "truncated",
          "as_of"
        ],
        "title": "FetchedProvision",
        "type": "object"
      },
      "InputItem": {
        "description": "One turn of the conversation. A `system` or `developer` item is accepted and not replayed into the model. Other fields, such as `type` and `id`, are ignored, so a previous response's `output` can be sent back unchanged.",
        "properties": {
          "content": {
            "oneOf": [
              {
                "maxLength": 50000,
                "minLength": 1,
                "type": "string"
              },
              {
                "description": "Text parts, joined with a newline. Any other part type is refused.",
                "items": {
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "input_text",
                        "output_text"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            ]
          },
          "role": {
            "enum": [
              "user",
              "assistant",
              "system",
              "developer"
            ],
            "type": "string"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "title": "InputItem",
        "type": "object"
      },
      "InputTokensDetails": {
        "properties": {
          "cached_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "cached_tokens"
        ],
        "title": "InputTokensDetails",
        "type": "object"
      },
      "LookupUsage": {
        "description": "What a provision lookup cost.",
        "properties": {
          "cost": {
            "$ref": "#/components/schemas/Cost",
            "description": "What the call was billed: zero for a sandbox key and for a fetch that found nothing. A replay (`Idempotent-Replayed: true`) repeats the original body, so this is what the original request was billed; the replay itself is never charged."
          }
        },
        "required": [
          "cost"
        ],
        "title": "LookupUsage",
        "type": "object"
      },
      "OutputMessage": {
        "description": "The one output item this API produces.",
        "properties": {
          "content": {
            "items": {
              "$ref": "#/components/schemas/OutputText"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "role": {
            "const": "assistant",
            "type": "string"
          },
          "status": {
            "const": "completed",
            "type": "string"
          },
          "type": {
            "const": "message",
            "type": "string"
          }
        },
        "required": [
          "type",
          "id",
          "role",
          "content",
          "status"
        ],
        "title": "OutputMessage",
        "type": "object"
      },
      "OutputText": {
        "description": "The answer. Citations are reduced to their labels; `annotations` locate them.",
        "properties": {
          "annotations": {
            "items": {
              "$ref": "#/components/schemas/UrlCitation"
            },
            "type": "array"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "const": "output_text",
            "type": "string"
          }
        },
        "required": [
          "type",
          "text",
          "annotations"
        ],
        "title": "OutputText",
        "type": "object"
      },
      "OutputTokensDetails": {
        "properties": {
          "reasoning_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "reasoning_tokens"
        ],
        "title": "OutputTokensDetails",
        "type": "object"
      },
      "ProvisionFetchBody": {
        "additionalProperties": false,
        "description": "`POST /v1/provisions/fetch`: `unit_id`s, and the day whose versions to read (today in\nUTC when absent).",
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The day whose version is read, `YYYY-MM-DD`; today in UTC when absent."
          },
          "ids": {
            "description": "The `unit_id`s to read, from a source record or a search hit.",
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "ids"
        ],
        "title": "ProvisionFetchBody",
        "type": "object"
      },
      "ProvisionList": {
        "description": "The answer to `POST /v1/provisions/search`.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ProvisionRecord"
            },
            "type": "array"
          },
          "object": {
            "const": "list",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/LookupUsage"
          }
        },
        "required": [
          "object",
          "data",
          "usage"
        ],
        "title": "ProvisionList",
        "type": "object"
      },
      "ProvisionRecord": {
        "description": "A provision as a lookup returns it. A lookup leaves out a provision with no stable\n`unit_id`, so its `unit_id`, `act` and `country` are always there.",
        "properties": {
          "act": {
            "$ref": "#/components/schemas/ActRef"
          },
          "country": {
            "description": "A lower-case country code.",
            "type": "string"
          },
          "excerpt": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "At most 300 characters, whitespace collapsed."
          },
          "kind": {
            "const": "provision",
            "type": "string"
          },
          "section": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "description": "A display label: the act's short title, then the section.",
            "type": "string"
          },
          "unit_id": {
            "description": "A provision's id, the same across versions and re-ingestion: pass it to `POST /v1/provisions/fetch`. A Hungarian id is `hu:njt:<njt id>:<path>`.",
            "type": "string"
          },
          "url": {
            "description": "An absolute URL, always present.",
            "format": "uri",
            "type": "string"
          },
          "url_kind": {
            "description": "`official` is the publisher's own page, `viewer` our provision or document viewer.",
            "enum": [
              "official",
              "viewer"
            ],
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VersionRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version read. Null for a version that never commenced."
          }
        },
        "required": [
          "title",
          "section",
          "url",
          "excerpt",
          "kind",
          "unit_id",
          "act",
          "country",
          "version",
          "url_kind"
        ],
        "title": "ProvisionRecord",
        "type": "object"
      },
      "ProvisionSearchBody": {
        "additionalProperties": false,
        "description": "`POST /v1/provisions/search`: AND-ed words, and how many hits to return.",
        "properties": {
          "limit": {
            "default": 10,
            "description": "How many hits to return.",
            "maximum": 20,
            "minimum": 1,
            "type": "integer"
          },
          "query": {
            "description": "The words to search for. All are required, and one is enough; a word starting with `-` is dropped and phrases are not searched.",
            "maxLength": 500,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "query"
        ],
        "title": "ProvisionSearchBody",
        "type": "object"
      },
      "Reasoning": {
        "properties": {
          "effort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "effort",
          "summary"
        ],
        "title": "Reasoning",
        "type": "object"
      },
      "ResponseError": {
        "description": "Why a response failed or was cancelled. Not a refused request: it arrives in a\n`200` envelope.",
        "properties": {
          "code": {
            "description": "`invalid_prompt` when the turn was declined, `cancelled` when the response was cancelled, `server_error` otherwise.",
            "enum": [
              "server_error",
              "invalid_prompt",
              "cancelled"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ResponseError",
        "type": "object"
      },
      "ResponseObject": {
        "description": "A response, in OpenAI's Responses shape plus `depth`, `sources` and `usage.cost`.\n\nFields OpenAI defines and this API does not use keep their defaults.",
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unix seconds at which the response ended, whatever its status."
          },
          "created_at": {
            "description": "Unix seconds.",
            "type": "integer"
          },
          "depth": {
            "anyOf": [
              {
                "enum": [
                  "standard",
                  "deep"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Echoed from the request; null for a response made before depth existed."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResponseError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "incomplete_details": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "model": {
            "description": "The label the request named, echoed.",
            "type": "string"
          },
          "object": {
            "const": "response",
            "type": "string"
          },
          "output": {
            "description": "Empty until the response is `completed`: there is no partial text.",
            "items": {
              "$ref": "#/components/schemas/OutputMessage"
            },
            "type": "array"
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reasoning": {
            "$ref": "#/components/schemas/Reasoning"
          },
          "sources": {
            "description": "What the answer cites, numbered by first citation. Empty until the response is `completed`.",
            "items": {
              "$ref": "#/components/schemas/SourceRecord"
            },
            "type": "array"
          },
          "status": {
            "enum": [
              "queued",
              "in_progress",
              "completed",
              "failed",
              "cancelled"
            ],
            "type": "string"
          },
          "store": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "text": {
            "$ref": "#/components/schemas/TextConfig"
          },
          "tool_choice": {
            "type": "string"
          },
          "tools": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array"
          },
          "top_p": {
            "type": "number"
          },
          "truncation": {
            "enum": [
              "auto",
              "disabled"
            ],
            "type": "string"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Usage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Present once the response has ended."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "status",
          "error",
          "incomplete_details",
          "instructions",
          "metadata",
          "model",
          "depth",
          "output",
          "sources",
          "parallel_tool_calls",
          "previous_response_id",
          "reasoning",
          "store",
          "temperature",
          "text",
          "tool_choice",
          "tools",
          "top_p",
          "truncation",
          "usage",
          "completed_at"
        ],
        "title": "ResponseObject",
        "type": "object"
      },
      "SourceRecord": {
        "description": "One source an answer cites, numbered by first citation: a provision, a passage or a\nweb page.",
        "properties": {
          "act": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A lower-case country code."
          },
          "excerpt": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "At most 300 characters, whitespace collapsed."
          },
          "kind": {
            "enum": [
              "provision",
              "passage",
              "web"
            ],
            "type": "string"
          },
          "number": {
            "description": "`source_number` of the annotations that cite it.",
            "minimum": 1,
            "type": "integer"
          },
          "section": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "description": "A display label: the act's short title, then the section.",
            "type": "string"
          },
          "unit_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A provision's id, the same across versions and re-ingestion: pass it to `POST /v1/provisions/fetch`. A Hungarian id is `hu:njt:<njt id>:<path>`. Null for a passage, a web page, and a provision whose id is not stable."
          },
          "url": {
            "description": "An absolute URL, always present.",
            "format": "uri",
            "type": "string"
          },
          "url_kind": {
            "description": "`official` is the publisher's own page, `viewer` our provision or document viewer, `web` a web page's own URL.",
            "enum": [
              "official",
              "viewer",
              "web"
            ],
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VersionRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version cited. Null for a passage, a web page and a version that never commenced."
          }
        },
        "required": [
          "title",
          "section",
          "url",
          "excerpt",
          "number",
          "kind",
          "unit_id",
          "act",
          "country",
          "version",
          "url_kind"
        ],
        "title": "SourceRecord",
        "type": "object"
      },
      "TextConfig": {
        "properties": {
          "format": {
            "$ref": "#/components/schemas/TextFormat"
          }
        },
        "required": [
          "format"
        ],
        "title": "TextConfig",
        "type": "object"
      },
      "TextFormat": {
        "properties": {
          "type": {
            "const": "text",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "TextFormat",
        "type": "object"
      },
      "UrlCitation": {
        "description": "A cited label in the text, and the source it cites.",
        "properties": {
          "end_index": {
            "description": "Where the label ends, exclusive.",
            "minimum": 0,
            "type": "integer"
          },
          "source_number": {
            "description": "The `number` of the source in `sources`.",
            "minimum": 1,
            "type": "integer"
          },
          "start_index": {
            "description": "Where the label starts, counted in Unicode code points of `text`, so `text[start_index:end_index]` is the label.",
            "minimum": 0,
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "const": "url_citation",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "start_index",
          "end_index",
          "url",
          "title",
          "source_number"
        ],
        "title": "UrlCitation",
        "type": "object"
      },
      "Usage": {
        "description": "An ended response's tokens and what it cost.",
        "properties": {
          "cost": {
            "$ref": "#/components/schemas/Cost",
            "description": "What the response was billed, never what the model cost. Zero for a response that is not charged and for a sandbox key."
          },
          "input_tokens": {
            "type": "integer"
          },
          "input_tokens_details": {
            "$ref": "#/components/schemas/InputTokensDetails"
          },
          "output_tokens": {
            "type": "integer"
          },
          "output_tokens_details": {
            "$ref": "#/components/schemas/OutputTokensDetails"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "total_tokens",
          "input_tokens_details",
          "output_tokens_details",
          "cost"
        ],
        "title": "Usage",
        "type": "object"
      },
      "VersionRef": {
        "description": "The version of a provision that was cited or read.",
        "properties": {
          "effective_from": {
            "format": "date",
            "type": "string"
          },
          "effective_to": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Names the version; not stable across re-ingestion.",
            "format": "uuid",
            "type": "string"
          },
          "is_current": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "effective_from",
          "effective_to",
          "is_current"
        ],
        "title": "VersionRef",
        "type": "object"
      },
      "WebhookEvent": {
        "description": "What a webhook endpoint receives when a `background: true` response ends. The event\nnames the response and carries no answer: fetch it with `GET /v1/responses/{id}`.",
        "properties": {
          "created_at": {
            "description": "Unix seconds.",
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/WebhookEventData"
          },
          "id": {
            "description": "Also the `webhook-id` header.",
            "pattern": "^evt_[0-9a-f]{32}$",
            "type": "string"
          },
          "object": {
            "const": "event",
            "type": "string"
          },
          "type": {
            "enum": [
              "response.completed",
              "response.failed",
              "response.cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "WebhookEvent",
        "type": "object"
      },
      "WebhookEventData": {
        "properties": {
          "id": {
            "description": "The response the event is about.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "WebhookEventData",
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Answers from the law, with their sources, in OpenAI's Responses shape, and lookups of the provisions behind them.\n\nA request this API refuses is answered with an HTTP error status and the `ErrorBody` object. Two answers are outside that object: a request that matches no route, `404` or `405` as `{\"detail\": \"...\"}`, and a body past the size limit, `413`, as plain text with a `Content-Length` over the limit and as `{\"detail\": \"Content Too Large\"}` for a chunked body without one. The limit is enforced when the body is first read, after the key is checked and the request is counted against the key's per-minute limit. Every answer carries `x-request-id`.",
    "title": "Azta API",
    "version": "v1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/provisions/fetch": {
      "post": {
        "description": "Read provisions by `unit_id`, from a source record or a search hit: at most 20 per call. A `unit_id` names a provision, not a version, so it keeps working after the law is amended.\n\n`as_of` picks the version in force that day, today in UTC without it; each record echoes the date it used. `text` is cut to 20,000 characters. An id that was not found, or that this API does not serve (`us`, an add-on corpus, a country whose ids are not yet stable), is in `not_found` and free.\n\nCharged per provision returned; a call that returns none is not charged. `X-Jurisdiction` is checked as for a search and narrows nothing.",
        "operationId": "fetchProvisions",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/Jurisdiction"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionFetchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchList"
                }
              }
            },
            "description": "The provisions found, and the ids that were not.",
            "headers": {
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              },
              "x-ratelimit-limit-requests": {
                "$ref": "#/components/headers/x-ratelimit-limit-requests"
              },
              "x-ratelimit-remaining-requests": {
                "$ref": "#/components/headers/x-ratelimit-remaining-requests"
              },
              "x-ratelimit-reset-requests": {
                "$ref": "#/components/headers/x-ratelimit-reset-requests"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_request`: The body or a header is invalid; `param` names the field.\n- `unsupported_jurisdiction`: `X-Jurisdiction` names `us`, `oecd`, `ifrs` or an unknown code; on a search, also when none of the countries it names can be searched by provision.\n- `idempotency_key_reused`: The `Idempotency-Key` was used for a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_api_key`: The key is missing, malformed, unknown, revoked or expired.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `insufficient_credits`: Not enough credit, or no credit account.\n- `spend_cap_reached`: A company, key or postpaid monthly spend cap would be exceeded.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `account_suspended`: The credit account is suspended or closed.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `idempotency_key_in_use`: A request with this `Idempotency-Key` is still being processed.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `rate_limit_exceeded`: The key's requests-per-minute limit is used up.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `server_error`: Anything else. It never carries exception text.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `ledger_unavailable`: The credit ledger could not answer, so the request fails closed. A `503` at the start of a request charges nothing; a lookup's `503` after its provisions were read may have charged it, and a retry with the same `Idempotency-Key` never charges it twice.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          }
        },
        "summary": "Fetch provisions",
        "tags": [
          "Provisions"
        ]
      }
    },
    "/v1/provisions/search": {
      "post": {
        "description": "Search the current provisions of the law in force, with no model call.\n\nThe words of `query` are all required, and one word is enough. A word starting with `-` is dropped and phrases are not searched. A hit without a `unit_id` is left out. `X-Jurisdiction` names at most 3 countries; when none of them can be searched by provision the call is `unsupported_jurisdiction`, and free.\n\nCharged per call. A sandbox key gets sample records.",
        "operationId": "searchProvisions",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/Jurisdiction"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionSearchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisionList"
                }
              }
            },
            "description": "The hits, best first.",
            "headers": {
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              },
              "x-ratelimit-limit-requests": {
                "$ref": "#/components/headers/x-ratelimit-limit-requests"
              },
              "x-ratelimit-remaining-requests": {
                "$ref": "#/components/headers/x-ratelimit-remaining-requests"
              },
              "x-ratelimit-reset-requests": {
                "$ref": "#/components/headers/x-ratelimit-reset-requests"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_request`: The body or a header is invalid; `param` names the field.\n- `unsupported_jurisdiction`: `X-Jurisdiction` names `us`, `oecd`, `ifrs` or an unknown code; on a search, also when none of the countries it names can be searched by provision.\n- `idempotency_key_reused`: The `Idempotency-Key` was used for a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_api_key`: The key is missing, malformed, unknown, revoked or expired.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `insufficient_credits`: Not enough credit, or no credit account.\n- `spend_cap_reached`: A company, key or postpaid monthly spend cap would be exceeded.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `account_suspended`: The credit account is suspended or closed.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `idempotency_key_in_use`: A request with this `Idempotency-Key` is still being processed.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `rate_limit_exceeded`: The key's requests-per-minute limit is used up.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `server_error`: Anything else. It never carries exception text.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `ledger_unavailable`: The credit ledger could not answer, so the request fails closed. A `503` at the start of a request charges nothing; a lookup's `503` after its provisions were read may have charged it, and a retry with the same `Idempotency-Key` never charges it twice.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          }
        },
        "summary": "Search provisions",
        "tags": [
          "Provisions"
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "description": "Ask a question and get an answer from the law, with its sources.\n\nSet exactly one of `stream` and `background` to `true`. `stream` answers `200` with server-sent events; `background` answers `202` with the response at `status: queued`, which you poll with `getResponse` and which sends a webhook when it ends.\n\nThis API is stateless: `input` is a string, or the whole conversation as items whose last item has the role `user`. `conversation` and `previous_response_id` are refused. Unknown fields are accepted and ignored.\n\nA response is charged to the organisation's credit balance (see `usage.cost`); a request the ledger refuses starts nothing.",
        "operationId": "createResponse",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/Jurisdiction"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateResponseBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "With `stream: true`, a server-sent event stream of the Responses events `response.created`, `response.in_progress`, `response.output_item.added`, `response.content_part.added`, `response.output_text.delta` (many), `response.output_text.done` (the whole text, and authoritative), `response.content_part.done`, `response.output_item.done`, then `response.completed`, or `response.failed`, which also ends a cancelled response, with `status: cancelled`. A `: ping` comment arrives every 15 seconds. Annotations and `sources` arrive only in the closing frames. Dropping the connection does not cancel the response.\n\nA repeat of an earlier create under the same `Idempotency-Key` answers with the response object as JSON, as it is now, whether the original streamed or not.",
            "headers": {
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              },
              "x-ratelimit-limit-requests": {
                "$ref": "#/components/headers/x-ratelimit-limit-requests"
              },
              "x-ratelimit-remaining-requests": {
                "$ref": "#/components/headers/x-ratelimit-remaining-requests"
              },
              "x-ratelimit-reset-requests": {
                "$ref": "#/components/headers/x-ratelimit-reset-requests"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              }
            },
            "description": "With `background: true`, the response at `status: queued`.",
            "headers": {
              "x-ratelimit-limit-requests": {
                "$ref": "#/components/headers/x-ratelimit-limit-requests"
              },
              "x-ratelimit-remaining-requests": {
                "$ref": "#/components/headers/x-ratelimit-remaining-requests"
              },
              "x-ratelimit-reset-requests": {
                "$ref": "#/components/headers/x-ratelimit-reset-requests"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_request`: The body or a header is invalid; `param` names the field.\n- `unsupported_parameter`: `previous_response_id` or `conversation` was sent. This API is stateless: send the conversation as input items.\n- `unsupported_jurisdiction`: `X-Jurisdiction` names `us`, `oecd`, `ifrs` or an unknown code; on a search, also when none of the countries it names can be searched by provision.\n- `idempotency_key_reused`: The `Idempotency-Key` was used for a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_api_key`: The key is missing, malformed, unknown, revoked or expired.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `insufficient_credits`: Not enough credit, or no credit account.\n- `spend_cap_reached`: A company, key or postpaid monthly spend cap would be exceeded.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `account_suspended`: The credit account is suspended or closed.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `idempotency_key_in_use`: A request with this `Idempotency-Key` is still being processed.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `rate_limit_exceeded`: The key's requests-per-minute limit is used up.\n- `concurrency_limit_exceeded`: The key already has as many responses in progress as it may.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `server_error`: Anything else. It never carries exception text.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `ledger_unavailable`: The credit ledger could not answer, so the request fails closed. A `503` at the start of a request charges nothing; a lookup's `503` after its provisions were read may have charged it, and a retry with the same `Idempotency-Key` never charges it twice.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          }
        },
        "summary": "Create a response",
        "tags": [
          "Responses"
        ]
      }
    },
    "/v1/responses/{response_id}": {
      "get": {
        "description": "A response this key created, whatever its state. A failure is in the object (`status`, `error`), never in the HTTP status.\n\n`output` is empty and `sources` is `[]` until the response is `completed`; there is no partial text. `usage` appears once it has ended.",
        "operationId": "getResponse",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResponseId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              }
            },
            "description": "The response, as it is now.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_api_key`: The key is missing, malformed, unknown, revoked or expired.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `not_found`: No such response: the id is unknown or malformed, or the response belongs to another key.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `server_error`: Anything else. It never carries exception text.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          }
        },
        "summary": "Retrieve a response",
        "tags": [
          "Responses"
        ]
      }
    },
    "/v1/responses/{response_id}/cancel": {
      "post": {
        "description": "Stop a response. A dropped stream cancels nothing; this call does.\n\nThe response comes back `cancelled` once nothing was left running, or `in_progress` while a step is still being torn down; a second cancel then also answers `200`. A response that has already finished is `response_finished`, which includes one whose answer was complete when the cancel arrived: that one completes and is charged.\n\nA response cancelled before its first text delta reached you is free; one cancelled after it is charged. The call accepts `Idempotency-Key` and stores nothing.",
        "operationId": "cancelResponse",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResponseId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              }
            },
            "description": "The response after the cancel.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `invalid_api_key`: The key is missing, malformed, unknown, revoked or expired.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `not_found`: No such response: the id is unknown or malformed, or the response belongs to another key.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `response_finished`: The response has already finished.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was refused.\n\n- `server_error`: Anything else. It never carries exception text.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            }
          }
        },
        "summary": "Cancel a response",
        "tags": [
          "Responses"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.azta.ai"
    }
  ],
  "tags": [
    {
      "name": "Responses"
    },
    {
      "name": "Provisions"
    },
    {
      "name": "Webhooks"
    }
  ],
  "webhooks": {
    "response.cancelled": {
      "post": {
        "description": "A `background: true` response was cancelled. The event names the response and carries no answer: fetch it with `getResponse`.",
        "parameters": [
          {
            "description": "The event's `id`. Deduplicate on it.",
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unix seconds at which this attempt was signed.",
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`v1,` and the base64 HMAC-SHA256 of the message, by Standard Webhooks, with the endpoint's `whsec_` secret.",
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event. Anything else, a redirect included, is a failed attempt and is retried; redirects are not followed."
          }
        },
        "security": [],
        "summary": "response.cancelled",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "response.completed": {
      "post": {
        "description": "A `background: true` response completed with an answer. The event names the response and carries no answer: fetch it with `getResponse`.",
        "parameters": [
          {
            "description": "The event's `id`. Deduplicate on it.",
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unix seconds at which this attempt was signed.",
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`v1,` and the base64 HMAC-SHA256 of the message, by Standard Webhooks, with the endpoint's `whsec_` secret.",
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event. Anything else, a redirect included, is a failed attempt and is retried; redirects are not followed."
          }
        },
        "security": [],
        "summary": "response.completed",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "response.failed": {
      "post": {
        "description": "A `background: true` response failed or was declined. The event names the response and carries no answer: fetch it with `getResponse`.",
        "parameters": [
          {
            "description": "The event's `id`. Deduplicate on it.",
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unix seconds at which this attempt was signed.",
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`v1,` and the base64 HMAC-SHA256 of the message, by Standard Webhooks, with the endpoint's `whsec_` secret.",
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event. Anything else, a redirect included, is a failed attempt and is retried; redirects are not followed."
          }
        },
        "security": [],
        "summary": "response.failed",
        "tags": [
          "Webhooks"
        ]
      }
    }
  }
}
