{
  "components": {
    "schemas": {
      "AnthropicCompatModel": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "id",
          "display_name",
          "created_at"
        ],
        "type": "object"
      },
      "AnthropicCompatModelsListResponse": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "created_at": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "id",
                "display_name",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "first_id": {
            "type": "string"
          },
          "has_more": {
            "type": "boolean"
          },
          "last_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "first_id",
          "last_id"
        ],
        "type": "object"
      },
      "AssetEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "error": {
                "type": "string"
              },
              "id": {
                "description": "Use it as an image, reference image, video or audio source on POST /v3/videos with a bytedance:ap Seedance model.",
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "object": {
                "enum": [
                  "asset"
                ],
                "type": "string"
              },
              "providers": {
                "description": "Where the asset is registered, one entry per video provider with its status there. Use the asset with a model of a provider where it is active. One provider today: bytedance:ap (Seedance).",
                "items": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "provider": {
                      "description": "The provider prefix of the models it works with, such as bytedance:ap.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The status at this provider; the same values as the top-level status.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "provider",
                    "status"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "status": {
                "description": "queued: waiting to be sent (a person's assets wait for their verification). processing: being checked; a person's assets are matched to their face. active: usable. failed: refused, see error.",
                "enum": [
                  "queued",
                  "processing",
                  "active",
                  "failed"
                ],
                "type": "string"
              },
              "subject_id": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio"
                ],
                "type": "string"
              }
            },
            "required": [
              "id",
              "object",
              "subject_id",
              "providers",
              "type",
              "name",
              "status",
              "created_at"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "AssetListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "id": {
                  "description": "Use it as an image, reference image, video or audio source on POST /v3/videos with a bytedance:ap Seedance model.",
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "object": {
                  "enum": [
                    "asset"
                  ],
                  "type": "string"
                },
                "providers": {
                  "description": "Where the asset is registered, one entry per video provider with its status there. Use the asset with a model of a provider where it is active. One provider today: bytedance:ap (Seedance).",
                  "items": {
                    "properties": {
                      "error": {
                        "type": "string"
                      },
                      "provider": {
                        "description": "The provider prefix of the models it works with, such as bytedance:ap.",
                        "type": "string"
                      },
                      "status": {
                        "description": "The status at this provider; the same values as the top-level status.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "provider",
                      "status"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "status": {
                  "description": "queued: waiting to be sent (a person's assets wait for their verification). processing: being checked; a person's assets are matched to their face. active: usable. failed: refused, see error.",
                  "enum": [
                    "queued",
                    "processing",
                    "active",
                    "failed"
                  ],
                  "type": "string"
                },
                "subject_id": {
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "image",
                    "video",
                    "audio"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "id",
                "object",
                "subject_id",
                "providers",
                "type",
                "name",
                "status",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "AudioGenerationJobResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status_url"
        ],
        "type": "object"
      },
      "AudioGenerationRequest": {
        "properties": {
          "async": {
            "description": "Run generation on the background worker and return a job to poll (202) instead of waiting inline (200). Use for full-length tracks and slow models.",
            "type": "boolean"
          },
          "duration_seconds": {
            "description": "Requested length in seconds (up to 600). Omit it to let the model choose. Limits differ by model, and some models have no length setting; a value a model cannot honor answers 400 naming its limit.",
            "type": "number"
          },
          "format": {
            "description": "Output audio format: mp3, wav, opus or pcm. Omit it to get the model's native format. A format the model cannot produce answers 400 naming the ones it can.",
            "type": "string"
          },
          "instrumental": {
            "description": "Music only: generate without vocals.",
            "type": "boolean"
          },
          "loop": {
            "description": "Generate audio that repeats seamlessly, for ambience and hums. Needs a model with the audio_loop capability (GET /v3/audio/models?capability=audio_loop); other models answer 400.",
            "type": "boolean"
          },
          "max_retries": {
            "default": 2,
            "description": "Retries on the same endpoint when the provider rejects the call before doing any work (HTTP 429 or a gateway 502/503/504 with no result, or a connection that never reached it). Only the successful attempt is billed. Default 2 / max 3; 0 turns retries off.",
            "maximum": 3,
            "minimum": 0,
            "type": "integer"
          },
          "model": {
            "description": "Audio generation model id. List them with GET /v3/audio/models: ?type=music for songs and scores, ?type=sound for sound effects and ambience, ?capability=audio_sections or ?capability=audio_loop for models that take those fields. For example elevenlabs/music_v2_5 (music) or elevenlabs/eleven_text_to_sound_v2 (sound effects).",
            "type": "string"
          },
          "parameters": {
            "description": "Provider-specific fields forwarded verbatim, except fields owned by normalized inputs and shared-account song selectors. Use scoped sections for song references; the provider validates other settings.",
            "type": "object"
          },
          "prompt": {
            "description": "What to generate. For music: genre, mood, instruments, lyrics. For a sound effect: the sound itself, for example \"a single hammer strike on an iron anvil\". Required unless sections are set.",
            "type": "string"
          },
          "sections": {
            "description": "A timed plan for music that must fit a picture: each section's duration_ms plus its own prompt and styles, in order. The sections set the total length, so duration_seconds is not sent with them. Needs a model with the audio_sections capability (GET /v3/audio/models?capability=audio_sections); other models answer 400.",
            "items": {
              "properties": {
                "condition_on": {
                  "properties": {
                    "end_ms": {
                      "type": "integer"
                    },
                    "song": {
                      "type": "string"
                    },
                    "start_ms": {
                      "type": "integer"
                    },
                    "strength": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "song",
                    "start_ms",
                    "end_ms"
                  ],
                  "type": "object"
                },
                "context_adherence": {
                  "type": "string"
                },
                "duration_ms": {
                  "description": "Length of this section in milliseconds. Models set their own per-section limits and answer 400 outside them.",
                  "type": "integer"
                },
                "end_ms": {
                  "type": "integer"
                },
                "lyrics": {
                  "description": "Words to be sung in this section. Leave it empty for an instrumental section.",
                  "type": "string"
                },
                "negative_styles": {
                  "description": "Styles this section should avoid, for example [\"vocals\"].",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "prompt": {
                  "description": "What this section should sound like, in words, for example \"a quiet piano intro\" or \"strings build to a swell\". It describes the music and is never sung; put sung words in lyrics.",
                  "type": "string"
                },
                "song": {
                  "type": "string"
                },
                "start_ms": {
                  "type": "integer"
                },
                "styles": {
                  "description": "Styles this section should have, for example [\"sparse piano\", \"instrumental\"].",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "seed": {
            "description": "Seed for more repeatable output. Models without seed support answer 400.",
            "type": "integer"
          },
          "store": {
            "description": "Persist the generated audio to /v3/files and return a reusable file_id. Defaults to false; set true to store.",
            "type": "boolean"
          },
          "store_song": {
            "description": "Store a reusable song for inpainting, separately from store (which saves a file). Requires audio_song_storage and nonzero project retention.",
            "type": "boolean"
          }
        },
        "required": [
          "model"
        ],
        "type": "object"
      },
      "AudioGenerationResponse": {
        "properties": {
          "audio": {
            "properties": {
              "b64_json": {
                "type": "string"
              },
              "file_id": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "created": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "lyrics": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "plan": {
            "type": "object"
          },
          "song": {
            "properties": {
              "expires_at": {
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "expires_at"
            ],
            "type": "object"
          },
          "store_song_skipped": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "attempts": {
                "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
                "type": "integer"
              },
              "cost": {
                "type": "number"
              },
              "duration_seconds": {
                "type": "number"
              }
            },
            "required": [
              "cost"
            ],
            "type": "object"
          },
          "words_timestamps": {
            "items": {
              "properties": {
                "end_ms": {
                  "type": "integer"
                },
                "start_ms": {
                  "type": "integer"
                },
                "word": {
                  "type": "string"
                }
              },
              "required": [
                "word",
                "start_ms",
                "end_ms"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "model",
          "created",
          "audio",
          "usage"
        ],
        "type": "object"
      },
      "AudioGenerationUsage": {
        "properties": {
          "attempts": {
            "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
            "type": "integer"
          },
          "cost": {
            "type": "number"
          },
          "duration_seconds": {
            "type": "number"
          }
        },
        "required": [
          "cost"
        ],
        "type": "object"
      },
      "AudioSection": {
        "properties": {
          "condition_on": {
            "properties": {
              "end_ms": {
                "type": "integer"
              },
              "song": {
                "type": "string"
              },
              "start_ms": {
                "type": "integer"
              },
              "strength": {
                "type": "string"
              }
            },
            "required": [
              "song",
              "start_ms",
              "end_ms"
            ],
            "type": "object"
          },
          "context_adherence": {
            "type": "string"
          },
          "duration_ms": {
            "description": "Length of this section in milliseconds. Models set their own per-section limits and answer 400 outside them.",
            "type": "integer"
          },
          "end_ms": {
            "type": "integer"
          },
          "lyrics": {
            "description": "Words to be sung in this section. Leave it empty for an instrumental section.",
            "type": "string"
          },
          "negative_styles": {
            "description": "Styles this section should avoid, for example [\"vocals\"].",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "prompt": {
            "description": "What this section should sound like, in words, for example \"a quiet piano intro\" or \"strings build to a swell\". It describes the music and is never sung; put sung words in lyrics.",
            "type": "string"
          },
          "song": {
            "type": "string"
          },
          "start_ms": {
            "type": "integer"
          },
          "styles": {
            "description": "Styles this section should have, for example [\"sparse piano\", \"instrumental\"].",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "BatchList": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "cancelled_at": {
                  "type": "integer"
                },
                "completed_at": {
                  "type": "integer"
                },
                "completion_window": {
                  "type": "string"
                },
                "created_at": {
                  "type": "integer"
                },
                "endpoint": {
                  "type": "string"
                },
                "error": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                },
                "errors": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "object": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "type": "object"
                },
                "expired_at": {
                  "type": "integer"
                },
                "expires_at": {
                  "type": "integer"
                },
                "failed_at": {
                  "type": "integer"
                },
                "finalized_at": {
                  "type": "integer"
                },
                "finalizing_at": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "in_progress_at": {
                  "type": "integer"
                },
                "metadata": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "model": {
                  "type": "string"
                },
                "object": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "region": {
                  "type": "string"
                },
                "request_counts": {
                  "properties": {
                    "completed": {
                      "type": "integer"
                    },
                    "failed": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "total",
                    "completed",
                    "failed"
                  ],
                  "type": "object"
                },
                "results_deleted": {
                  "type": "boolean"
                },
                "results_expire_at": {
                  "type": "integer"
                },
                "status": {
                  "type": "string"
                },
                "usage": {
                  "properties": {
                    "completion_tokens": {
                      "type": "integer"
                    },
                    "cost": {
                      "type": "number"
                    },
                    "prompt_tokens": {
                      "type": "integer"
                    },
                    "total_tokens": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "prompt_tokens",
                    "completion_tokens",
                    "total_tokens",
                    "cost"
                  ],
                  "type": "object"
                },
                "webhook": {
                  "description": "Any value"
                }
              },
              "required": [
                "id",
                "object",
                "endpoint",
                "model",
                "provider",
                "completion_window",
                "status",
                "request_counts",
                "metadata",
                "error",
                "errors",
                "created_at",
                "in_progress_at",
                "finalizing_at",
                "completed_at",
                "failed_at",
                "expired_at",
                "cancelled_at",
                "finalized_at",
                "expires_at",
                "results_expire_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "has_more": {
            "type": "boolean"
          },
          "last_id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "BatchObject": {
        "properties": {
          "cancelled_at": {
            "type": "integer"
          },
          "completed_at": {
            "type": "integer"
          },
          "completion_window": {
            "type": "string"
          },
          "created_at": {
            "type": "integer"
          },
          "endpoint": {
            "type": "string"
          },
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "errors": {
            "properties": {
              "data": {
                "items": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "object": {
                "type": "string"
              }
            },
            "required": [
              "object",
              "data"
            ],
            "type": "object"
          },
          "expired_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "failed_at": {
            "type": "integer"
          },
          "finalized_at": {
            "type": "integer"
          },
          "finalizing_at": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "in_progress_at": {
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "request_counts": {
            "properties": {
              "completed": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "total",
              "completed",
              "failed"
            ],
            "type": "object"
          },
          "results_deleted": {
            "type": "boolean"
          },
          "results_expire_at": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "completion_tokens": {
                "type": "integer"
              },
              "cost": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "integer"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "prompt_tokens",
              "completion_tokens",
              "total_tokens",
              "cost"
            ],
            "type": "object"
          },
          "webhook": {
            "description": "Any value"
          }
        },
        "required": [
          "id",
          "object",
          "endpoint",
          "model",
          "provider",
          "completion_window",
          "status",
          "request_counts",
          "metadata",
          "error",
          "errors",
          "created_at",
          "in_progress_at",
          "finalizing_at",
          "completed_at",
          "failed_at",
          "expired_at",
          "cancelled_at",
          "finalized_at",
          "expires_at",
          "results_expire_at"
        ],
        "type": "object"
      },
      "BatchRequest": {
        "properties": {
          "callback_url": {
            "description": "HTTPS URL that receives a signed `batch.completed`, `batch.failed`, `batch.cancelled` or `batch.expired` webhook when the batch ends, so you do not have to poll. `batch.completed` can still hold failed requests: check `data.request_counts.failed`. Without it, the project's default webhook URL is used when one is set (GET /v3/webhooks/settings). Same rules as a video's `callback_url`, each answered with a 400 that names it: https only, port 443 (or none), no `user:password@`, no `#fragment`, at most 2048 characters, and a public host. Verify the signature with the project's secret; see the `jobCompleted` webhook for the payload, headers and retries.",
            "type": "string"
          },
          "completion_window": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "provider": {
            "properties": {
              "allow_fallbacks": {
                "type": "boolean"
              },
              "only": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "requests": {
            "items": {
              "properties": {
                "body": {
                  "description": "Any value"
                },
                "custom_id": {
                  "type": "string"
                }
              },
              "required": [
                "custom_id",
                "body"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "endpoint",
          "model",
          "requests"
        ],
        "type": "object"
      },
      "BatchResultsPage": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "custom_id": {
                  "type": "string"
                },
                "error": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "code",
                    "message"
                  ],
                  "type": "object"
                },
                "id": {
                  "type": "string"
                },
                "response": {
                  "properties": {
                    "body": {
                      "description": "Any value"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "status_code",
                    "body"
                  ],
                  "type": "object"
                },
                "usage": {
                  "properties": {
                    "completion_tokens": {
                      "type": "integer"
                    },
                    "cost": {
                      "type": "number"
                    },
                    "prompt_tokens": {
                      "type": "integer"
                    },
                    "total_tokens": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "prompt_tokens",
                    "completion_tokens",
                    "total_tokens",
                    "cost"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "id",
                "custom_id",
                "response",
                "error"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          },
          "object": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "Benchmark": {
        "properties": {
          "aa_slug": {
            "type": "string"
          },
          "agentic_index": {
            "type": "number"
          },
          "as_of": {
            "type": "string"
          },
          "coding_index": {
            "type": "number"
          },
          "evaluations": {
            "properties": {
              "aime": {
                "type": "number"
              },
              "aime_25": {
                "type": "number"
              },
              "automationbench_aa": {
                "type": "number"
              },
              "frontiercode_v2_0": {
                "type": "number"
              },
              "gpqa": {
                "type": "number"
              },
              "hle": {
                "type": "number"
              },
              "ifbench": {
                "type": "number"
              },
              "lcr": {
                "type": "number"
              },
              "livecodebench": {
                "type": "number"
              },
              "math_500": {
                "type": "number"
              },
              "mmlu_pro": {
                "type": "number"
              },
              "scicode": {
                "type": "number"
              },
              "tau2": {
                "type": "number"
              },
              "terminalbench_hard": {
                "type": "number"
              },
              "terminalbench_v4_0": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "finance_index": {
            "type": "number"
          },
          "healthcare_index": {
            "type": "number"
          },
          "intelligence_index": {
            "type": "number"
          },
          "legal_index": {
            "type": "number"
          },
          "math_index": {
            "type": "number"
          },
          "multilingual_index": {
            "type": "number"
          },
          "scores": {
            "properties": {
              "agents": {
                "type": "number"
              },
              "agents_previous": {
                "type": "boolean"
              },
              "coding": {
                "type": "number"
              },
              "coding_previous": {
                "type": "boolean"
              },
              "finance": {
                "type": "number"
              },
              "healthcare": {
                "type": "number"
              },
              "intelligence": {
                "type": "number"
              },
              "legal": {
                "type": "number"
              },
              "multilingual": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "source",
          "as_of"
        ],
        "type": "object"
      },
      "BenchmarkEvaluations": {
        "properties": {
          "aime": {
            "type": "number"
          },
          "aime_25": {
            "type": "number"
          },
          "automationbench_aa": {
            "type": "number"
          },
          "frontiercode_v2_0": {
            "type": "number"
          },
          "gpqa": {
            "type": "number"
          },
          "hle": {
            "type": "number"
          },
          "ifbench": {
            "type": "number"
          },
          "lcr": {
            "type": "number"
          },
          "livecodebench": {
            "type": "number"
          },
          "math_500": {
            "type": "number"
          },
          "mmlu_pro": {
            "type": "number"
          },
          "scicode": {
            "type": "number"
          },
          "tau2": {
            "type": "number"
          },
          "terminalbench_hard": {
            "type": "number"
          },
          "terminalbench_v4_0": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "CanonicalWebSearchTool": {
        "properties": {
          "allowed_domains": {
            "description": "Restrict results to these domains (e.g. \"go.dev\" or \"pkg.go.dev\").",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "country": {
            "description": "Two-letter ISO-3166 alpha-2 country code (e.g. \"se\" or \"us\") biasing results to that region. Case-insensitive.",
            "type": "string"
          },
          "engine": {
            "description": "Search engine. auto (default) prefers the model's native server tool when available and falls back to Opper's engine. native requires native (400 if the routed model has no native web_search on this endpoint). opper always uses Opper's engine and lets Opper pick the backend. jina / exa / exa-lite / linkup / searchbase pin a specific backend within Opper's engine. exa-lite is Exa's cheaper search type on the same index.",
            "enum": [
              "auto",
              "native",
              "opper",
              "jina",
              "exa",
              "exa-lite",
              "linkup",
              "searchbase"
            ],
            "type": "string"
          },
          "excluded_domains": {
            "description": "Exclude results from these domains (e.g. \"reddit.com\").",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "freshness": {
            "description": "Narrow results by recency. d (24h) | w (7d) | m (30d) | y (1y). Empty (default) applies no time filter.",
            "enum": [
              "d",
              "w",
              "m",
              "y"
            ],
            "type": "string"
          },
          "max_results": {
            "description": "Results per individual search. 0 uses the engine default (typically 5).",
            "type": "integer"
          },
          "max_total_results": {
            "description": "Cumulative result cap across every search the model runs in this request. 0 disables the cap.",
            "type": "integer"
          },
          "max_uses": {
            "description": "Maximum number of searches the model may run in this request. 0 uses the runtime default.",
            "type": "integer"
          },
          "search_context_size": {
            "description": "Per-result snippet length in characters. very_low ≈ 1000; low ≈ 5000; medium ≈ 10000 (default); high ≈ 30000; full returns the full extracted page content (capped ~50000).",
            "enum": [
              "very_low",
              "low",
              "medium",
              "high",
              "full"
            ],
            "type": "string"
          },
          "type": {
            "description": "Tool discriminator. Must be the literal string \"opper:web_search\".",
            "enum": [
              "opper:web_search"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ChatAnnotation": {
        "properties": {
          "type": {
            "type": "string"
          },
          "url_citation": {
            "properties": {
              "content": {
                "type": "string"
              },
              "end_index": {
                "type": "integer"
              },
              "start_index": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ChatChoice": {
        "properties": {
          "finish_reason": {
            "type": "string"
          },
          "index": {
            "type": "integer"
          },
          "message": {
            "properties": {
              "annotations": {
                "items": {
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "url_citation": {
                      "properties": {
                        "content": {
                          "type": "string"
                        },
                        "end_index": {
                          "type": "integer"
                        },
                        "start_index": {
                          "type": "integer"
                        },
                        "title": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "content": {
                "type": "string"
              },
              "reasoning_content": {
                "description": "The model's reasoning for this response when the provider returns it. Send it back as reasoning_content on this assistant message in the next request so a thinking model keeps its work across tool calls.",
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "tool_calls": {
                "items": {
                  "properties": {
                    "extra_content": {
                      "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Send it back unchanged in the next request.",
                      "properties": {
                        "google": {
                          "properties": {
                            "thought_signature": {
                              "description": "Gemini signature for this tool call. Send it back unchanged in the next request.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "function": {
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "arguments"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "type": "string"
                    },
                    "thought_signature": {
                      "description": "Gemini signature for this tool call. Send it back unchanged on the tool call in the next request. Same value as extra_content.google.thought_signature.",
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "function"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "role",
              "content"
            ],
            "type": "object"
          }
        },
        "required": [
          "index",
          "message",
          "finish_reason"
        ],
        "type": "object"
      },
      "ChatFunctionCall": {
        "properties": {
          "arguments": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "arguments"
        ],
        "type": "object"
      },
      "ChatMessage": {
        "properties": {
          "annotations": {
            "items": {
              "properties": {
                "type": {
                  "type": "string"
                },
                "url_citation": {
                  "properties": {
                    "content": {
                      "type": "string"
                    },
                    "end_index": {
                      "type": "integer"
                    },
                    "start_index": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "content": {
            "type": "string"
          },
          "reasoning_content": {
            "description": "The model's reasoning for this response when the provider returns it. Send it back as reasoning_content on this assistant message in the next request so a thinking model keeps its work across tool calls.",
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "tool_calls": {
            "items": {
              "properties": {
                "extra_content": {
                  "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Send it back unchanged in the next request.",
                  "properties": {
                    "google": {
                      "properties": {
                        "thought_signature": {
                          "description": "Gemini signature for this tool call. Send it back unchanged in the next request.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                },
                "function": {
                  "properties": {
                    "arguments": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "arguments"
                  ],
                  "type": "object"
                },
                "id": {
                  "type": "string"
                },
                "thought_signature": {
                  "description": "Gemini signature for this tool call. Send it back unchanged on the tool call in the next request. Same value as extra_content.google.thought_signature.",
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "type",
                "function"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "type": "object"
      },
      "ChatRequest": {
        "properties": {
          "cache_control": {
            "description": "Opt in to automatic prompt caching for Anthropic-family models: {\"type\":\"ephemeral\"} (optionally \"ttl\":\"1h\"). Places one moving cache breakpoint on the largest cacheable prefix. Also settable per content part for precise placement. Requests from a coding agent (Pi",
            "type": [
              "object",
              "null"
            ]
          },
          "custom_model_credentials": {
            "properties": {
              "api_key": {
                "type": "string"
              },
              "base_url": {
                "type": "string"
              },
              "extra": {
                "type": "object"
              },
              "identifier": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "identifier",
              "api_key"
            ],
            "type": "object"
          },
          "max_completion_tokens": {
            "type": "integer"
          },
          "max_tokens": {
            "type": "integer"
          },
          "messages": {
            "items": {
              "properties": {
                "content": {
                  "description": "Any value"
                },
                "name": {
                  "type": "string"
                },
                "reasoning_content": {
                  "description": "Assistant messages only: the reasoning the model returned on this turn (the reasoning_content of that response) sent back so a thinking model keeps its own work across tool calls (DeepSeek and GLM thinking mode; Kimi K3). Passed to the provider only on models whose params.reasoning.history in /v3/models is reasoning_content; other models ignore it.",
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "tool_call_id": {
                  "type": "string"
                },
                "tool_calls": {
                  "items": {
                    "properties": {
                      "custom": {
                        "properties": {
                          "input": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "input"
                        ],
                        "type": "object"
                      },
                      "extra_content": {
                        "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Today only google.thought_signature: the Gemini signature for this tool call as returned in the response. Send it back unchanged."
                      },
                      "function": {
                        "properties": {
                          "arguments": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "arguments"
                        ],
                        "type": "object"
                      },
                      "id": {
                        "type": "string"
                      },
                      "thought_signature": {
                        "description": "Gemini signature for this tool call as returned in the response. Send it back unchanged: Gemini thinking models reject a conversation whose earlier tool calls lost it. Older form of extra_content.google.thought_signature; when both are sent the extra_content value is used.",
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "function"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "role",
                "content"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "metadata": {
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "models": {
            "description": "Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in model and the rest here; or omit model and the first entry is the primary. Each entry is any model string: a bare pooled name; a provider/model id; an org alias. Not allowed together with a dynamic/\u003cname\u003e route. At most 10 entries. Which model answered is in meta.routing.served and the X-Opper-Served-Model header; the model field still echoes what you sent.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "output_schema": {
            "type": "object"
          },
          "prompt_cache_key": {
            "description": "OpenAI cache-routing key: a stable name for the prompt prefix this request shares with others (e.g. a document id for a fan-out over one context). Forwarded to OpenAI and used to keep requests that share the key on the same cache replica at providers with per-replica prompt caches.",
            "type": "string"
          },
          "reasoning_effort": {
            "type": "string"
          },
          "response_format": {
            "type": "object"
          },
          "service_tier": {
            "description": "Processing tier. flex: discounted and slower; when the provider has no flex capacity the call fails with 429 instead of running at the full price. priority (alias fast): faster at a premium; falls back to the default tier. ultrafast: fastest; falls back to priority then default. economy: the same model cheaper and slower where a provider sells it under its own model id; it never falls back to the default tier. default and auto: the provider default. A model without an endpoint for the requested tier runs at the default tier. The tier that ran is in the X-Opper-Served-Service-Tier header.",
            "type": "string"
          },
          "stop": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "stream": {
            "type": "boolean"
          },
          "stream_options": {
            "properties": {
              "include_usage": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "temperature": {
            "type": "number"
          },
          "tool_choice": {
            "description": "Any value"
          },
          "tools": {
            "items": {
              "properties": {
                "aspect_ratio": {
                  "type": "string"
                },
                "custom": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "format": {
                      "type": "object"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                },
                "description": {
                  "type": "string"
                },
                "format": {
                  "type": "object"
                },
                "function": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object"
                    },
                    "strict": {
                      "description": "Whether the model must follow parameters exactly. Forwarded to providers that enforce it.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                },
                "model": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "quality": {
                  "type": "string"
                },
                "size": {
                  "type": "string"
                },
                "style": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "top_p": {
            "type": "number"
          },
          "user": {
            "description": "OpenAI end-user identifier. Hashed and used as the cache replica hint on providers with per-replica prompt caches when neither prompt_cache_key nor an X-Session-Affinity header is sent.",
            "type": "string"
          }
        },
        "required": [
          "messages"
        ],
        "type": "object"
      },
      "ChatRequestMessage": {
        "properties": {
          "content": {
            "description": "Any value"
          },
          "name": {
            "type": "string"
          },
          "reasoning_content": {
            "description": "Assistant messages only: the reasoning the model returned on this turn (the reasoning_content of that response) sent back so a thinking model keeps its own work across tool calls (DeepSeek and GLM thinking mode; Kimi K3). Passed to the provider only on models whose params.reasoning.history in /v3/models is reasoning_content; other models ignore it.",
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "tool_call_id": {
            "type": "string"
          },
          "tool_calls": {
            "items": {
              "properties": {
                "custom": {
                  "properties": {
                    "input": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "input"
                  ],
                  "type": "object"
                },
                "extra_content": {
                  "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Today only google.thought_signature: the Gemini signature for this tool call as returned in the response. Send it back unchanged."
                },
                "function": {
                  "properties": {
                    "arguments": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "arguments"
                  ],
                  "type": "object"
                },
                "id": {
                  "type": "string"
                },
                "thought_signature": {
                  "description": "Gemini signature for this tool call as returned in the response. Send it back unchanged: Gemini thinking models reject a conversation whose earlier tool calls lost it. Older form of extra_content.google.thought_signature; when both are sent the extra_content value is used.",
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "type",
                "function"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "type": "object"
      },
      "ChatRequestTool": {
        "properties": {
          "aspect_ratio": {
            "type": "string"
          },
          "custom": {
            "properties": {
              "description": {
                "type": "string"
              },
              "format": {
                "type": "object"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "format": {
            "type": "object"
          },
          "function": {
            "properties": {
              "description": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "parameters": {
                "type": "object"
              },
              "strict": {
                "description": "Whether the model must follow parameters exactly. Forwarded to providers that enforce it.",
                "type": "boolean"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "quality": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "style": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ChatRequestToolFunction": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          },
          "strict": {
            "description": "Whether the model must follow parameters exactly. Forwarded to providers that enforce it.",
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "ChatResponse": {
        "properties": {
          "choices": {
            "items": {
              "properties": {
                "finish_reason": {
                  "type": "string"
                },
                "index": {
                  "type": "integer"
                },
                "message": {
                  "properties": {
                    "annotations": {
                      "items": {
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "url_citation": {
                            "properties": {
                              "content": {
                                "type": "string"
                              },
                              "end_index": {
                                "type": "integer"
                              },
                              "start_index": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "content": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "description": "The model's reasoning for this response when the provider returns it. Send it back as reasoning_content on this assistant message in the next request so a thinking model keeps its work across tool calls.",
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "tool_calls": {
                      "items": {
                        "properties": {
                          "extra_content": {
                            "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Send it back unchanged in the next request.",
                            "properties": {
                              "google": {
                                "properties": {
                                  "thought_signature": {
                                    "description": "Gemini signature for this tool call. Send it back unchanged in the next request.",
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "function": {
                            "properties": {
                              "arguments": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "arguments"
                            ],
                            "type": "object"
                          },
                          "id": {
                            "type": "string"
                          },
                          "thought_signature": {
                            "description": "Gemini signature for this tool call. Send it back unchanged on the tool call in the next request. Same value as extra_content.google.thought_signature.",
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "function"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "index",
                "message",
                "finish_reason"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "cost": {
            "type": "number"
          },
          "created": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "meta": {
            "properties": {
              "guards": {
                "items": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "findings": {
                      "items": {
                        "description": "Any value"
                      },
                      "type": "array"
                    },
                    "flagged": {
                      "type": "boolean"
                    },
                    "phase": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "rule_id": {
                      "type": "string"
                    },
                    "rule_name": {
                      "type": "string"
                    },
                    "scope_type": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "flagged"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "trace_uuid": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "completion_tokens": {
                "type": "integer"
              },
              "completion_tokens_details": {
                "properties": {
                  "reasoning_tokens": {
                    "type": "integer"
                  }
                },
                "required": [
                  "reasoning_tokens"
                ],
                "type": "object"
              },
              "prompt_tokens": {
                "type": "integer"
              },
              "prompt_tokens_details": {
                "properties": {
                  "cache_creation_1h_tokens": {
                    "type": "integer"
                  },
                  "cache_creation_tokens": {
                    "type": "integer"
                  },
                  "cached_tokens": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "server_tool_use": {
                "type": "object"
              },
              "total_tokens": {
                "type": "integer"
              },
              "usage_buckets": {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              }
            },
            "required": [
              "prompt_tokens",
              "completion_tokens",
              "total_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "model",
          "choices",
          "usage"
        ],
        "type": "object"
      },
      "ChatStreamChoice": {
        "properties": {
          "delta": {
            "properties": {
              "annotations": {
                "items": {
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "url_citation": {
                      "properties": {
                        "content": {
                          "type": "string"
                        },
                        "end_index": {
                          "type": "integer"
                        },
                        "start_index": {
                          "type": "integer"
                        },
                        "title": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "content": {
                "type": "string"
              },
              "reasoning_content": {
                "description": "The model's reasoning for this response when the provider returns it. Send it back as reasoning_content on this assistant message in the next request so a thinking model keeps its work across tool calls.",
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "tool_calls": {
                "items": {
                  "properties": {
                    "extra_content": {
                      "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Send it back unchanged in the next request.",
                      "properties": {
                        "google": {
                          "properties": {
                            "thought_signature": {
                              "description": "Gemini signature for this tool call. Send it back unchanged in the next request.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "function": {
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "id": {
                      "type": "string"
                    },
                    "index": {
                      "type": "integer"
                    },
                    "thought_signature": {
                      "description": "Gemini signature for this tool call. Send it back unchanged on the tool call in the next request. Same value as extra_content.google.thought_signature.",
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "index"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "finish_reason": {
            "type": "string"
          },
          "index": {
            "type": "integer"
          }
        },
        "required": [
          "index",
          "delta",
          "finish_reason"
        ],
        "type": "object"
      },
      "ChatStreamChunk": {
        "properties": {
          "choices": {
            "items": {
              "properties": {
                "delta": {
                  "properties": {
                    "annotations": {
                      "items": {
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "url_citation": {
                            "properties": {
                              "content": {
                                "type": "string"
                              },
                              "end_index": {
                                "type": "integer"
                              },
                              "start_index": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "content": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "description": "The model's reasoning for this response when the provider returns it. Send it back as reasoning_content on this assistant message in the next request so a thinking model keeps its work across tool calls.",
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "tool_calls": {
                      "items": {
                        "properties": {
                          "extra_content": {
                            "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Send it back unchanged in the next request.",
                            "properties": {
                              "google": {
                                "properties": {
                                  "thought_signature": {
                                    "description": "Gemini signature for this tool call. Send it back unchanged in the next request.",
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "function": {
                            "properties": {
                              "arguments": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "id": {
                            "type": "string"
                          },
                          "index": {
                            "type": "integer"
                          },
                          "thought_signature": {
                            "description": "Gemini signature for this tool call. Send it back unchanged on the tool call in the next request. Same value as extra_content.google.thought_signature.",
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "index"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "finish_reason": {
                  "type": "string"
                },
                "index": {
                  "type": "integer"
                }
              },
              "required": [
                "index",
                "delta",
                "finish_reason"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "cost": {
            "type": "number"
          },
          "created": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "meta": {
            "properties": {
              "guards": {
                "items": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "findings": {
                      "items": {
                        "description": "Any value"
                      },
                      "type": "array"
                    },
                    "flagged": {
                      "type": "boolean"
                    },
                    "phase": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "rule_id": {
                      "type": "string"
                    },
                    "rule_name": {
                      "type": "string"
                    },
                    "scope_type": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "flagged"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "trace_uuid": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "time_to_first_token_ms": {
            "type": "integer"
          },
          "usage": {
            "properties": {
              "completion_tokens": {
                "type": "integer"
              },
              "completion_tokens_details": {
                "properties": {
                  "reasoning_tokens": {
                    "type": "integer"
                  }
                },
                "required": [
                  "reasoning_tokens"
                ],
                "type": "object"
              },
              "prompt_tokens": {
                "type": "integer"
              },
              "prompt_tokens_details": {
                "properties": {
                  "cache_creation_1h_tokens": {
                    "type": "integer"
                  },
                  "cache_creation_tokens": {
                    "type": "integer"
                  },
                  "cached_tokens": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "server_tool_use": {
                "type": "object"
              },
              "total_tokens": {
                "type": "integer"
              },
              "usage_buckets": {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              }
            },
            "required": [
              "prompt_tokens",
              "completion_tokens",
              "total_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "model",
          "choices"
        ],
        "type": "object"
      },
      "ChatStreamDelta": {
        "properties": {
          "annotations": {
            "items": {
              "properties": {
                "type": {
                  "type": "string"
                },
                "url_citation": {
                  "properties": {
                    "content": {
                      "type": "string"
                    },
                    "end_index": {
                      "type": "integer"
                    },
                    "start_index": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "content": {
            "type": "string"
          },
          "reasoning_content": {
            "description": "The model's reasoning for this response when the provider returns it. Send it back as reasoning_content on this assistant message in the next request so a thinking model keeps its work across tool calls.",
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "tool_calls": {
            "items": {
              "properties": {
                "extra_content": {
                  "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Send it back unchanged in the next request.",
                  "properties": {
                    "google": {
                      "properties": {
                        "thought_signature": {
                          "description": "Gemini signature for this tool call. Send it back unchanged in the next request.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                },
                "function": {
                  "properties": {
                    "arguments": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "id": {
                  "type": "string"
                },
                "index": {
                  "type": "integer"
                },
                "thought_signature": {
                  "description": "Gemini signature for this tool call. Send it back unchanged on the tool call in the next request. Same value as extra_content.google.thought_signature.",
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "index"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ChatToolCall": {
        "properties": {
          "extra_content": {
            "description": "Provider metadata on a tool call in the shape of Google's OpenAI-compatible API. Send it back unchanged in the next request.",
            "properties": {
              "google": {
                "properties": {
                  "thought_signature": {
                    "description": "Gemini signature for this tool call. Send it back unchanged in the next request.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "function": {
            "properties": {
              "arguments": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "arguments"
            ],
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "thought_signature": {
            "description": "Gemini signature for this tool call. Send it back unchanged on the tool call in the next request. Same value as extra_content.google.thought_signature.",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "function"
        ],
        "type": "object"
      },
      "ChatURLCitation": {
        "properties": {
          "content": {
            "type": "string"
          },
          "end_index": {
            "type": "integer"
          },
          "start_index": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "ChatUsage": {
        "properties": {
          "completion_tokens": {
            "type": "integer"
          },
          "completion_tokens_details": {
            "properties": {
              "reasoning_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "reasoning_tokens"
            ],
            "type": "object"
          },
          "prompt_tokens": {
            "type": "integer"
          },
          "prompt_tokens_details": {
            "properties": {
              "cache_creation_1h_tokens": {
                "type": "integer"
              },
              "cache_creation_tokens": {
                "type": "integer"
              },
              "cached_tokens": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "server_tool_use": {
            "type": "object"
          },
          "total_tokens": {
            "type": "integer"
          },
          "usage_buckets": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object"
          }
        },
        "required": [
          "prompt_tokens",
          "completion_tokens",
          "total_tokens"
        ],
        "type": "object"
      },
      "ClairicAnswer": {
        "additionalProperties": true,
        "properties": {
          "confidence": {
            "type": "number"
          },
          "guess": {
            "description": "The most likely value, also when `value` is null.",
            "type": [
              "string",
              "number",
              "boolean",
              "array",
              "object",
              "null"
            ]
          },
          "mean": {
            "description": "Estimates: the mean.",
            "type": [
              "number",
              "string"
            ]
          },
          "median": {
            "description": "Estimates and forecasts: the median.",
            "type": [
              "number",
              "string"
            ]
          },
          "p10": {
            "description": "Estimates and forecasts: the low end of the 80% interval.",
            "type": [
              "number",
              "string"
            ]
          },
          "p90": {
            "description": "Estimates and forecasts: the high end of the 80% interval.",
            "type": [
              "number",
              "string"
            ]
          },
          "p_above": {
            "type": "number"
          },
          "p_below": {
            "type": "number"
          },
          "p_null": {
            "description": "Scalars: the probability that the input does not determine the value.",
            "type": "number"
          },
          "quantiles": {
            "description": "All 99 percentiles, with options.include_quantiles.",
            "type": "array"
          },
          "span": {
            "description": "Text: the start and end character offsets of the answer in the state.",
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "spans": {
            "description": "Lists: one span per item.",
            "items": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            "type": "array"
          },
          "steps": {
            "description": "Forecasts: one estimate per step.",
            "type": "array"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "description": "A valid value of the field's type, or null when the input does not determine it.",
            "type": [
              "string",
              "number",
              "boolean",
              "array",
              "object",
              "null"
            ]
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "ClairicRequest": {
        "additionalProperties": true,
        "properties": {
          "fields": {
            "additionalProperties": {
              "additionalProperties": true,
              "properties": {
                "decimals": {
                  "description": "Numbers, durations and number lists only.",
                  "maximum": 6,
                  "minimum": 0,
                  "type": "integer"
                },
                "horizon": {
                  "description": "Forecast only: the number of steps.",
                  "maximum": 64,
                  "minimum": 1,
                  "type": "integer"
                },
                "instructions": {
                  "description": "What the field should contain.",
                  "type": "string"
                },
                "integer": {
                  "description": "Numbers and durations only.",
                  "type": "boolean"
                },
                "interval": {
                  "description": "Forecast only: step, minute, hour, day, week, month, quarter or year.",
                  "type": "string"
                },
                "items": {
                  "description": "Required for a list: `text`, `number` or `date`.",
                  "type": "string"
                },
                "max": {
                  "description": "Required for an estimate or forecast: a number, or an ISO date for a date estimate."
                },
                "min": {
                  "description": "Required for an estimate or forecast: a number, or an ISO date for a date estimate."
                },
                "null_threshold": {
                  "description": "Probability of null above which the value is null (default 0.5).",
                  "type": "number"
                },
                "scale": {
                  "description": "`linear` (default) or `log`.",
                  "type": "string"
                },
                "step": {
                  "description": "Estimate grid: a positive number (days for a date estimate), or `month` or `year`."
                },
                "type": {
                  "description": "`text` (an exact span of the state), `number`, `date`, `time`, `datetime`, `duration`, `list` (all matches, in input order), `estimate` (a distribution within `min` and `max`) or `forecast` (one estimate per future step).",
                  "type": "string"
                },
                "unit": {
                  "description": "Unit label. For a duration: seconds, minutes, hours, days, weeks, months or years (default seconds).",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "description": "Field name to typed field spec. At least one field and no upper limit: fields that do not fit next to the state in one pass are split across parallel passes.",
            "minProperties": 1,
            "type": "object"
          },
          "images": {
            "description": "Up to four inline images placed before the state (4 MiB each, 8 MiB total decoded). Remote URLs are not accepted.",
            "items": {
              "oneOf": [
                {
                  "description": "A base64 data URL: PNG, JPEG or WebP.",
                  "pattern": "^[Dd][Aa][Tt][Aa]:",
                  "type": "string"
                },
                {
                  "properties": {
                    "base64": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content_type",
                    "base64"
                  ],
                  "type": "object"
                }
              ]
            },
            "maxItems": 4,
            "type": "array"
          },
          "model": {
            "description": "`clairic`, the model's pool (its pooled endpoints), or an endpoint id such as `cloudflare:global/clairic`, which pins that endpoint.",
            "example": "clairic",
            "minLength": 1,
            "type": "string"
          },
          "options": {
            "additionalProperties": true,
            "properties": {
              "include_quantiles": {
                "description": "Add all 99 percentiles to estimates.",
                "type": "boolean"
              },
              "return_state_text": {
                "description": "Return the text that spans index into.",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "reference_date": {
            "description": "ISO date that anchors dates written without a year.",
            "type": "string"
          },
          "state": {
            "description": "The text to read and predict from. Must be non-empty unless images are sent. Text answers are spans of this string.",
            "type": "string"
          }
        },
        "required": [
          "model",
          "fields"
        ],
        "type": "object"
      },
      "ClairicResponse": {
        "additionalProperties": true,
        "properties": {
          "answers": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ClairicAnswer"
            },
            "description": "One answer per field, keyed by field name.",
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "state_text": {
            "type": "string"
          },
          "truncated": {
            "type": "boolean"
          },
          "usage": {
            "additionalProperties": true,
            "properties": {
              "image_tokens": {
                "type": "integer"
              },
              "input_tokens": {
                "description": "What Opper bills, at the endpoint's input price.",
                "minimum": 0,
                "type": "integer"
              },
              "output_tokens": {
                "minimum": 0,
                "type": "integer"
              },
              "passes": {
                "type": "integer"
              },
              "schema_tokens": {
                "type": "integer"
              },
              "state_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "input_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "model",
          "answers",
          "usage"
        ],
        "type": "object"
      },
      "CodexModel": {
        "properties": {
          "base_instructions": {
            "type": "string"
          },
          "context_window": {
            "type": "integer"
          },
          "default_reasoning_level": {
            "type": "string"
          },
          "default_reasoning_summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "experimental_supported_tools": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "input_modalities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "priority": {
            "type": "integer"
          },
          "shell_type": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "support_verbosity": {
            "type": "boolean"
          },
          "supported_in_api": {
            "type": "boolean"
          },
          "supported_reasoning_levels": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "effort": {
                  "type": "string"
                }
              },
              "required": [
                "effort",
                "description"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "supports_reasoning_summaries": {
            "type": "boolean"
          },
          "truncation_policy": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "mode": {
                "type": "string"
              }
            },
            "required": [
              "mode",
              "limit"
            ],
            "type": "object"
          },
          "visibility": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "display_name",
          "description",
          "supported_reasoning_levels",
          "supports_reasoning_summaries",
          "shell_type",
          "visibility",
          "supported_in_api",
          "priority",
          "base_instructions",
          "default_reasoning_summary",
          "support_verbosity",
          "truncation_policy",
          "experimental_supported_tools",
          "input_modalities",
          "context_window"
        ],
        "type": "object"
      },
      "CodexModelCatalog": {
        "properties": {
          "models": {
            "items": {
              "properties": {
                "base_instructions": {
                  "type": "string"
                },
                "context_window": {
                  "type": "integer"
                },
                "default_reasoning_level": {
                  "type": "string"
                },
                "default_reasoning_summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "experimental_supported_tools": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "input_modalities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "priority": {
                  "type": "integer"
                },
                "shell_type": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "support_verbosity": {
                  "type": "boolean"
                },
                "supported_in_api": {
                  "type": "boolean"
                },
                "supported_reasoning_levels": {
                  "items": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "effort": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "effort",
                      "description"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "supports_reasoning_summaries": {
                  "type": "boolean"
                },
                "truncation_policy": {
                  "properties": {
                    "limit": {
                      "type": "integer"
                    },
                    "mode": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode",
                    "limit"
                  ],
                  "type": "object"
                },
                "visibility": {
                  "type": "string"
                }
              },
              "required": [
                "slug",
                "display_name",
                "description",
                "supported_reasoning_levels",
                "supports_reasoning_summaries",
                "shell_type",
                "visibility",
                "supported_in_api",
                "priority",
                "base_instructions",
                "default_reasoning_summary",
                "support_verbosity",
                "truncation_policy",
                "experimental_supported_tools",
                "input_modalities",
                "context_window"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "models"
        ],
        "type": "object"
      },
      "CodexReasoningLevel": {
        "properties": {
          "description": {
            "type": "string"
          },
          "effort": {
            "type": "string"
          }
        },
        "required": [
          "effort",
          "description"
        ],
        "type": "object"
      },
      "CodexTruncationPolicy": {
        "properties": {
          "limit": {
            "type": "integer"
          },
          "mode": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "limit"
        ],
        "type": "object"
      },
      "CountTokensResponse": {
        "properties": {
          "cachedContentTokenCount": {
            "type": "integer"
          },
          "totalTokens": {
            "type": "integer"
          }
        },
        "required": [
          "totalTokens"
        ],
        "type": "object"
      },
      "CreateAssetRequest": {
        "properties": {
          "name": {
            "description": "A label for your own use. Not sent to the provider.",
            "type": "string"
          },
          "source": {
            "description": "A file_\u003cid\u003e uploaded with POST /v3/files in this project, or a public HTTPS URL. Image: jpeg, png, webp, bmp, tiff, gif or heic, 300 to 6000 px a side, under 30 MB. Video: mp4 or mov, 2 to 30 s, up to 200 MB. Audio: wav or mp3, 2 to 30 s, up to 15 MB.",
            "type": "string"
          },
          "type": {
            "enum": [
              "image",
              "video",
              "audio"
            ],
            "type": "string"
          }
        },
        "required": [
          "source",
          "type"
        ],
        "type": "object"
      },
      "CreateManagementAPIKeyRequest": {
        "properties": {
          "allowed_ips": {
            "description": "IP addresses or CIDR ranges the key accepts calls from (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only; up to 100 entries; ranges no wider than /8 for IPv4 or /16 for IPv6. Empty accepts any IP. Calls from any other address get 403 ip_not_allowed. A change takes up to a minute to apply.",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          },
          "idempotency_key": {
            "type": "string"
          },
          "kind": {
            "description": "personal (the default) or project. A project key needs the project_keys:manage permission.",
            "enum": [
              "personal",
              "project"
            ],
            "type": "string"
          },
          "monthly_limit_cents": {
            "description": "Monthly spend cap in US cents (500 is $5). Needs controls:write.",
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "return_secret": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateManagementAPIKeyResponse": {
        "properties": {
          "allowed_ips": {
            "description": "The IP addresses and CIDR ranges this key accepts calls from. An empty list accepts any IP.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "key": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "monthly_limit_cents": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "kind",
          "allowed_ips"
        ],
        "type": "object"
      },
      "CreateManagementCustomModelRequest": {
        "additionalProperties": false,
        "properties": {
          "credential": {
            "description": "Nonblank provider credential; at most 8192 UTF-8 bytes. Stored encrypted using the server's customer-data cipher. Never returned or tested with a provider.",
            "format": "password",
            "maxLength": 8192,
            "minLength": 1,
            "type": "string",
            "writeOnly": true
          },
          "idempotency_key": {
            "description": "Required operation identity. Reuse this key and the identical original input after an uncertain result; use the pure recovery endpoint to inspect completion without resending a credential.",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]{1,128}$",
            "type": "string"
          },
          "identifier": {
            "description": "Declared OpenAI LLM identifier using the default OpenAI endpoint. No custom URLs or extras are accepted. It is not checked against a provider or catalog.",
            "maxLength": 255,
            "pattern": "^openai/[A-Za-z0-9][A-Za-z0-9._:-]*$",
            "type": "string"
          },
          "name": {
            "description": "Nonblank display name. Preserved exactly; up to 255 Unicode characters.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "identifier",
          "credential",
          "idempotency_key"
        ],
        "type": "object"
      },
      "CreateManagementInviteRequest": {
        "properties": {
          "email": {
            "description": "The address to invite: one plain address, like name@example.com. Surrounding whitespace is trimmed. A display name, a list of addresses, spaces, control characters or non-ASCII characters are refused with 400.",
            "type": "string"
          },
          "idempotency_key": {
            "description": "Makes a retry safe: a repeat with the same key returns the first call's invitation without emailing again or moving the expiry. 1 to 128 letters, digits, dots, underscores, colons or hyphens. Omit it when you mean to resend.",
            "type": "string"
          },
          "role": {
            "description": "The role the invitee joins with: a built-in role, or on Enterprise one of the organization's custom roles. Control Plane and Enterprise only; on other plans omit it and the plan's default member role applies.",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "CreateManagementInviteResponse": {
        "properties": {
          "accepted": {
            "description": "Whether the invitation has been accepted.",
            "type": "boolean"
          },
          "accepted_at": {
            "description": "When the invitation was accepted. Absent until then.",
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "description": "The invited address.",
            "type": "string"
          },
          "email_sent": {
            "description": "Whether the invitation email was queued. When false the invitation still exists and you deliver invite_url yourself.",
            "type": "boolean"
          },
          "expires_at": {
            "description": "When the link stops working: four weeks from this call.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Invitation id. Pass it to DELETE /management/v1/invites/{id}.",
            "type": "integer"
          },
          "invite_url": {
            "description": "The platform link that accepts the invitation. Carries the token so treat it as a secret.",
            "type": "string"
          },
          "role": {
            "description": "The role the invitee joins with.",
            "type": "string"
          },
          "token": {
            "description": "The invitation's acceptance token. Treat it as a secret: anyone holding it can join the organization.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "accepted",
          "token",
          "invite_url",
          "email_sent"
        ],
        "type": "object"
      },
      "CreateManagementProjectRequest": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateManagementProjectWithAccessRequest": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "additionalProperties": false,
            "description": "Required initial access policy committed atomically with the project. Requires projects:write and project_access:write on a real management key. All nested fields are explicit. Null is invalid.",
            "properties": {
              "mode": {
                "enum": [
                  "organization",
                  "restricted"
                ],
                "type": "string"
              },
              "role_keys": {
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              "user_uuids": {
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              }
            },
            "required": [
              "mode",
              "role_keys",
              "user_uuids"
            ],
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "access"
        ],
        "type": "object"
      },
      "CreateManagementRoleRequest": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "description": "Nonblank custom role display name; built-in role names are reserved.",
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]{1",
            "type": "string"
          },
          "permissions": {
            "description": "Declared grants from the catalog admin ceiling. Duplicates are refused.",
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          },
          "priority": {
            "default": 150,
            "maximum": 299,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "display_name",
          "permissions",
          "idempotency_key"
        ],
        "type": "object"
      },
      "CreateSongEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "duration_seconds": {
                "type": "number"
              },
              "expires_at": {
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "model": {
                "type": "string"
              },
              "plan": {
                "type": "object"
              },
              "usage": {
                "properties": {
                  "attempts": {
                    "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
                    "type": "integer"
                  },
                  "cost": {
                    "type": "number"
                  },
                  "duration_seconds": {
                    "type": "number"
                  }
                },
                "required": [
                  "cost"
                ],
                "type": "object"
              },
              "words_timestamps": {
                "items": {
                  "properties": {
                    "end_ms": {
                      "type": "integer"
                    },
                    "start_ms": {
                      "type": "integer"
                    },
                    "word": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "word",
                    "start_ms",
                    "end_ms"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "id",
              "model",
              "created_at",
              "expires_at",
              "duration_seconds",
              "plan",
              "usage"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "CreateSongRequest": {
        "properties": {
          "audio": {
            "description": "A project-owned file ID, public HTTPS URL or audio data URI. Maximum 25 MB; duration must be readable for billing.",
            "type": "string"
          },
          "extract_plan": {
            "type": "boolean"
          },
          "model": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          }
        },
        "required": [
          "model",
          "audio"
        ],
        "type": "object"
      },
      "CreateSpanRequest": {
        "properties": {
          "end_time": {
            "format": "date-time",
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "input": {
            "type": "string"
          },
          "meta": {
            "type": "object"
          },
          "metadata": {
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "start_time": {
            "format": "date-time",
            "type": "string"
          },
          "tags": {
            "type": "object"
          },
          "trace_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateSpanResponse": {
        "properties": {
          "data": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "parent_id": {
                "type": "string"
              },
              "trace_id": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "trace_id",
              "name"
            ],
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "CreateSubjectRequest": {
        "properties": {
          "external_id": {
            "description": "Your own id for this person, up to 200 characters, returned on reads.",
            "type": "string"
          },
          "kind": {
            "description": "person (a real person, who verifies with a liveness check) or virtual (an AI-generated character).",
            "enum": [
              "person",
              "virtual"
            ],
            "type": "string"
          },
          "name": {
            "description": "A label for your own use, up to 200 characters. Not sent to the provider.",
            "type": "string"
          },
          "providers": {
            "description": "The video providers to register the subject with. Omit for the default, [\"bytedance:ap\"] (Seedance), which is the only one today.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "kind",
          "name"
        ],
        "type": "object"
      },
      "CreateVoiceRequest": {
        "properties": {
          "audio": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "languages": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "model": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          }
        },
        "required": [
          "model",
          "audio"
        ],
        "type": "object"
      },
      "DecisionAnswer": {
        "oneOf": [
          {
            "additionalProperties": true,
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "probability": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "type": {
                "enum": [
                  "predicate"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "probability"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "choice": {
                "description": "A string or a boolean. Values are typed: the string \"true\" and the boolean true are different choices.",
                "type": [
                  "string",
                  "boolean"
                ]
              },
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "probabilities": {
                "items": {
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "probability": {
                      "maximum": 1,
                      "minimum": 0,
                      "type": "number"
                    },
                    "value": {
                      "description": "A string or a boolean. Values are typed: the string \"true\" and the boolean true are different choices.",
                      "type": [
                        "string",
                        "boolean"
                      ]
                    }
                  },
                  "required": [
                    "value",
                    "probability"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "type": {
                "enum": [
                  "choice"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "choice",
              "confidence",
              "probabilities"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "probabilities": {
                "items": {
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "probability": {
                      "maximum": 1,
                      "minimum": 0,
                      "type": "number"
                    },
                    "value": {
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "value",
                    "probability"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "score": {
                "description": "Probability-weighted average of the level indices.",
                "maximum": 9,
                "minimum": 0,
                "type": "number"
              },
              "type": {
                "enum": [
                  "score"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "score",
              "confidence",
              "probabilities"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "spans": {
                "description": "Every match in the input, empty when nothing matched.",
                "items": {
                  "$ref": "#/components/schemas/LocateSpan"
                },
                "type": "array"
              },
              "type": {
                "enum": [
                  "locate"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "spans"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "enum": [
                  "refusal"
                ],
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "DecisionQuestion": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "instructions": {
                "type": "string"
              },
              "name": {
                "description": "Unique within the request; echoed on the answer.",
                "type": "string"
              },
              "type": {
                "enum": [
                  "predicate"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "choices": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "value": {
                      "description": "A string or a boolean. Values are typed: the string \"true\" and the boolean true are different choices.",
                      "type": [
                        "string",
                        "boolean"
                      ]
                    }
                  },
                  "required": [
                    "value"
                  ],
                  "type": "object"
                },
                "maxItems": 255,
                "minItems": 2,
                "type": "array"
              },
              "instructions": {
                "type": "string"
              },
              "name": {
                "description": "Unique within the request; echoed on the answer.",
                "type": "string"
              },
              "type": {
                "enum": [
                  "choice"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions",
              "choices"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "instructions": {
                "type": "string"
              },
              "levels": {
                "description": "Ordered from lowest to highest; level indices start at 0.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "label"
                  ],
                  "type": "object"
                },
                "maxItems": 10,
                "minItems": 2,
                "type": "array"
              },
              "name": {
                "description": "Unique within the request; echoed on the answer.",
                "type": "string"
              },
              "type": {
                "enum": [
                  "score"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions",
              "levels"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Opper extension, for models with the `locate` capability (Perplexity Decider v1.3): finds every span of the input that matches `instructions` (for example `email address`). `input` must be a string.",
            "properties": {
              "instructions": {
                "minLength": 1,
                "type": "string"
              },
              "name": {
                "description": "Unique within the request; echoed on the answer.",
                "type": "string"
              },
              "type": {
                "enum": [
                  "locate"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions"
            ],
            "type": "object"
          }
        ]
      },
      "DecisionRequest": {
        "additionalProperties": false,
        "properties": {
          "input": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "properties": {
                    "content": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "oneOf": [
                              {
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "input_text"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "type": "object"
                              },
                              {
                                "properties": {
                                  "detail": {
                                    "description": "Image detail level. Defaults to auto.",
                                    "enum": [
                                      "low",
                                      "high",
                                      "auto",
                                      "original"
                                    ],
                                    "type": "string"
                                  },
                                  "image_url": {
                                    "description": "Inline base64 data URL. Hosted URLs and file IDs are not accepted.",
                                    "pattern": "^data:",
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "input_image"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "minItems": 1,
                          "type": "array"
                        }
                      ]
                    },
                    "role": {
                      "enum": [
                        "user"
                      ],
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "message"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            ]
          },
          "model": {
            "example": "gpt-6-luna-decisions",
            "minLength": 1,
            "type": "string"
          },
          "questions": {
            "items": {
              "$ref": "#/components/schemas/DecisionQuestion"
            },
            "minItems": 1,
            "type": "array"
          },
          "safety_identifier": {
            "description": "Accepted for compatibility with OpenAI's API, then dropped: Opper neither forwards nor stores it. Requests to OpenAI carry Opper's own identifier for your project.",
            "type": "string"
          }
        },
        "required": [
          "model",
          "input",
          "questions"
        ],
        "type": "object"
      },
      "DecisionResponse": {
        "additionalProperties": true,
        "properties": {
          "answers": {
            "description": "One answer per question, in question order.",
            "items": {
              "$ref": "#/components/schemas/DecisionAnswer"
            },
            "type": "array"
          },
          "model": {
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/DecisionUsage"
          }
        },
        "required": [
          "model",
          "answers",
          "usage"
        ],
        "type": "object"
      },
      "DecisionUsage": {
        "additionalProperties": true,
        "properties": {
          "input_tokens": {
            "minimum": 0,
            "type": "integer"
          },
          "input_tokens_details": {
            "description": "The part of input_tokens served from the provider's prompt cache, billed at the model's cached-input price. Present only when the provider reports it.",
            "properties": {
              "cached_tokens": {
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "cached_tokens"
            ],
            "type": "object"
          },
          "output_tokens": {
            "minimum": 0,
            "type": "integer"
          },
          "total_tokens": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "input_tokens"
        ],
        "type": "object"
      },
      "DeleteManagementCustomModelRequest": {
        "additionalProperties": false,
        "properties": {
          "expected_change_token": {
            "description": "Opaque change token from the state read of this custom-model UUID. A changed live model returns 409; read its state again before deciding to retry.",
            "maxLength": 48,
            "minLength": 48,
            "pattern": "^cmv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          }
        },
        "required": [
          "expected_change_token"
        ],
        "type": "object"
      },
      "DeleteManagementRoleRequest": {
        "additionalProperties": false,
        "properties": {
          "expected_change_token": {
            "pattern": "^orv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          }
        },
        "required": [
          "expected_change_token"
        ],
        "type": "object"
      },
      "DeleteSongEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "deleted": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              },
              "provider_deleted": {
                "description": "False: only the Opper song reference is revoked. ElevenLabs has no public song deletion API.",
                "examples": [
                  false
                ],
                "type": "boolean"
              },
              "provider_retention": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "deleted",
              "provider_deleted",
              "provider_retention"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "DeletedEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "deleted": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "deleted"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "DynamicRoute": {
        "properties": {
          "active_version_number": {
            "type": "integer"
          },
          "active_version_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "deleted_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "draft_dirty": {
            "type": "boolean"
          },
          "invocation_model": {
            "type": "string"
          },
          "latest_version_number": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "uuid": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "uuid",
          "name",
          "display_name",
          "invocation_model",
          "description",
          "draft_dirty",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "DynamicRouteClassifierProperties": {
        "properties": {
          "cases": {
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "instructions": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "label",
                "instructions"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "context": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "cases"
        ],
        "type": "object"
      },
      "DynamicRouteConditionalProperties": {
        "properties": {
          "cases": {
            "items": {
              "properties": {
                "expression": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "id"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "cases"
        ],
        "type": "object"
      },
      "DynamicRouteCreateDeploymentRequest": {
        "properties": {
          "expected_active_version_number": {
            "description": "Required active version precondition; zero means currently unpublished.",
            "minimum": 0,
            "type": "integer"
          },
          "expected_draft_revision": {
            "description": "Required positive revision of the reviewed draft.",
            "minimum": 1,
            "type": "integer"
          },
          "expected_route_uuid": {
            "description": "Required nonzero identity of the route reviewed by the caller.",
            "format": "uuid",
            "type": "string"
          },
          "idempotency_key": {
            "description": "Required unique operation identifier. Reuse only for an identical retry; a fresh deployment requires a fresh key.",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "note": {
            "description": "Release note recorded on the new version.",
            "type": "string"
          }
        },
        "required": [
          "expected_route_uuid",
          "expected_draft_revision",
          "expected_active_version_number",
          "idempotency_key"
        ],
        "type": "object"
      },
      "DynamicRouteCreateRequest": {
        "properties": {
          "deploy": {
            "description": "When true the draft is validated and deployed as version 1 in the same call; the response then carries deployed_version in meta.",
            "type": "boolean"
          },
          "description": {
            "description": "Free-text description shown in the platform.",
            "type": "string"
          },
          "display_name": {
            "description": "Optional human label; preserves case and spaces. Empty uses the route identifier. Editable without deploying.",
            "maxLength": 128,
            "type": "string"
          },
          "graph": {
            "description": "Routing graph object with elements. Each node has id, type, outputs mapping output names to {elementId: targetID}, and optional properties. Include START/start and END/end. Supported types: start, end, model, pool, conditional, percentage, classifier, observe. Omit graph on create to seed a default; copy its returned draft.graph to customize. See tool description for node properties and topology.",
            "examples": [
              {
                "elements": [
                  {
                    "id": "START",
                    "outputs": {
                      "next": {
                        "elementId": "model_default"
                      }
                    },
                    "type": "start"
                  },
                  {
                    "id": "model_default",
                    "outputs": {
                      "fallback": {
                        "elementId": "END"
                      },
                      "success": {
                        "elementId": "END"
                      }
                    },
                    "properties": {
                      "label": "Default model",
                      "model": "cerebras/gpt-oss-120b"
                    },
                    "type": "model"
                  },
                  {
                    "id": "END",
                    "outputs": {},
                    "type": "end"
                  }
                ]
              }
            ],
            "properties": {
              "elements": {
                "items": {
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "outputs": {
                      "additionalProperties": {
                        "properties": {
                          "elementId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "elementId"
                        ],
                        "type": "object"
                      },
                      "type": "object"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "outputs"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "elements"
            ],
            "type": "object"
          },
          "layout": {
            "description": "Editor canvas positions keyed by element id. Opaque to the gateway; omit when authoring from code.",
            "type": "object"
          },
          "name": {
            "description": "Route name; callers invoke the route as dynamic/\u003cname\u003e. Lowercase letters and digits plus '.' '_' '-'; up to 128 characters; unique per organization.",
            "type": "string"
          },
          "note": {
            "description": "Release note recorded on the deployed version. Only read when deploy is true.",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "DynamicRouteDeployRequest": {
        "properties": {
          "expected_active_version_number": {
            "description": "Optional active version precondition; zero means currently unpublished. A changed live pointer returns 409.",
            "minimum": 0,
            "type": "integer"
          },
          "expected_draft_revision": {
            "description": "Optional positive revision of the draft reviewed by the caller; a changed draft returns 409.",
            "minimum": 1,
            "type": "integer"
          },
          "expected_route_uuid": {
            "description": "Optional route identity precondition; a recycled route name does not satisfy it.",
            "format": "uuid",
            "type": "string"
          },
          "idempotency_key": {
            "description": "Unique operation identifier. Reusing the same request returns its original deployed version without reactivating it. Use a fresh identifier for every new deployment.",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "note": {
            "description": "Release note recorded on the new version.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DynamicRouteDetail": {
        "properties": {
          "active_version": {
            "properties": {
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "note": {
                "type": "string"
              },
              "uuid": {
                "format": "uuid",
                "type": "string"
              },
              "version_number": {
                "type": "integer"
              }
            },
            "required": [
              "uuid",
              "version_number",
              "note",
              "created_at"
            ],
            "type": "object"
          },
          "draft": {
            "properties": {
              "graph": {
                "description": "The draft graph (DynamicRouteGraph).",
                "type": "object"
              },
              "layout": {
                "description": "Editor canvas positions keyed by element id.",
                "type": "object"
              },
              "revision": {
                "type": "integer"
              },
              "validation": {
                "description": "Validation issues on the draft (DynamicRouteValidationIssue); empty when it is deployable.",
                "type": "array"
              }
            },
            "required": [
              "graph",
              "layout",
              "validation",
              "revision"
            ],
            "type": "object"
          },
          "latest_version_number": {
            "type": "integer"
          },
          "route": {
            "properties": {
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "deleted_at": {
                "format": "date-time",
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "draft_graph": {
                "description": "The draft graph (DynamicRouteGraph).",
                "type": "object"
              },
              "draft_layout": {
                "description": "Editor canvas positions keyed by element id.",
                "type": "object"
              },
              "draft_revision": {
                "type": "integer"
              },
              "draft_validation": {
                "description": "Validation issues on the draft (DynamicRouteValidationIssue); empty when it is deployable.",
                "type": "array"
              },
              "invocation_model": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "updated_at": {
                "format": "date-time",
                "type": "string"
              },
              "uuid": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "uuid",
              "name",
              "display_name",
              "invocation_model",
              "description",
              "draft_revision",
              "created_at",
              "updated_at"
            ],
            "type": "object"
          },
          "version_count": {
            "type": "integer"
          }
        },
        "required": [
          "route",
          "draft",
          "version_count"
        ],
        "type": "object"
      },
      "DynamicRouteDraftRequest": {
        "properties": {
          "description": {
            "description": "New description. Omit to leave it unchanged.",
            "type": "string"
          },
          "graph": {
            "description": "Routing graph object with elements. Each node has id, type, outputs mapping output names to {elementId: targetID}, and optional properties. Include START/start and END/end. Supported types: start, end, model, pool, conditional, percentage, classifier, observe. Omit graph on create to seed a default; copy its returned draft.graph to customize. See tool description for node properties and topology.",
            "examples": [
              {
                "elements": [
                  {
                    "id": "START",
                    "outputs": {
                      "next": {
                        "elementId": "model_default"
                      }
                    },
                    "type": "start"
                  },
                  {
                    "id": "model_default",
                    "outputs": {
                      "fallback": {
                        "elementId": "END"
                      },
                      "success": {
                        "elementId": "END"
                      }
                    },
                    "properties": {
                      "label": "Default model",
                      "model": "cerebras/gpt-oss-120b"
                    },
                    "type": "model"
                  },
                  {
                    "id": "END",
                    "outputs": {},
                    "type": "end"
                  }
                ]
              }
            ],
            "properties": {
              "elements": {
                "items": {
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "outputs": {
                      "additionalProperties": {
                        "properties": {
                          "elementId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "elementId"
                        ],
                        "type": "object"
                      },
                      "type": "object"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "outputs"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "elements"
            ],
            "type": "object"
          },
          "layout": {
            "description": "Editor canvas positions keyed by element id. Opaque to the gateway.",
            "type": "object"
          }
        },
        "type": "object"
      },
      "DynamicRouteGraph": {
        "description": "Routing graph object with elements. Each node has id, type, outputs mapping output names to {elementId: targetID}, and optional properties. Include START/start and END/end. Supported types: start, end, model, pool, conditional, percentage, classifier, observe. Omit graph on create to seed a default; copy its returned draft.graph to customize. See tool description for node properties and topology.",
        "examples": [
          {
            "elements": [
              {
                "id": "START",
                "outputs": {
                  "next": {
                    "elementId": "model_default"
                  }
                },
                "type": "start"
              },
              {
                "id": "model_default",
                "outputs": {
                  "fallback": {
                    "elementId": "END"
                  },
                  "success": {
                    "elementId": "END"
                  }
                },
                "properties": {
                  "label": "Default model",
                  "model": "cerebras/gpt-oss-120b"
                },
                "type": "model"
              },
              {
                "id": "END",
                "outputs": {},
                "type": "end"
              }
            ]
          }
        ],
        "properties": {
          "elements": {
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "outputs": {
                  "additionalProperties": {
                    "properties": {
                      "elementId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "elementId"
                    ],
                    "type": "object"
                  },
                  "type": "object"
                },
                "properties": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "type",
                "outputs"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "elements"
        ],
        "type": "object"
      },
      "DynamicRouteMetadataRequest": {
        "properties": {
          "display_name": {
            "description": "Human label; preserves case and spaces. Empty clears the label. Does not change routing; draft revision; or deployed version.",
            "maxLength": 128,
            "type": "string"
          }
        },
        "required": [
          "display_name"
        ],
        "type": "object"
      },
      "DynamicRouteObserveProperties": {
        "properties": {
          "criteria": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "sample_rate": {
            "type": "number"
          },
          "score_type": {
            "type": "string"
          },
          "threshold": {
            "type": "number"
          }
        },
        "required": [
          "criteria"
        ],
        "type": "object"
      },
      "DynamicRoutePercentageProperties": {
        "properties": {
          "buckets": {
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "weight": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "weight"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "buckets"
        ],
        "type": "object"
      },
      "DynamicRoutePoolProperties": {
        "properties": {
          "expression": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "models": {
            "items": {
              "properties": {
                "args": {
                  "properties": {
                    "first_token_timeout_ms": {
                      "type": "integer"
                    },
                    "max_tokens": {
                      "type": "integer"
                    },
                    "reasoning_effort": {
                      "type": "string"
                    },
                    "temperature": {
                      "type": "number"
                    }
                  },
                  "type": "object"
                },
                "metrics": {
                  "type": "object"
                },
                "model": {
                  "type": "string"
                }
              },
              "required": [
                "model"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "order": {
            "type": "string"
          },
          "weights": {
            "properties": {
              "cost": {
                "type": "integer"
              },
              "throughput": {
                "type": "integer"
              },
              "ttft": {
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "models"
        ],
        "type": "object"
      },
      "DynamicRouteRollbackRequest": {
        "properties": {
          "note": {
            "description": "Release note recorded on the new version.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DynamicRouteSimulateRequest": {
        "properties": {
          "input": {
            "description": "The request body a conditional or classifier node reads; in the shape of the compat endpoint you call the route from (for chat completions: messages).",
            "type": "object"
          },
          "metadata": {
            "description": "Request metadata a conditional node can test (tags; headers; the caller's project).",
            "type": "object"
          },
          "overrides": {
            "description": "Forced outcomes per node id: which conditional case matches; which percentage bucket is drawn; whether a model succeeds or fails; which classifier case is picked.",
            "properties": {
              "classifier_cases": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "conditional_cases": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "model_outcomes": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "percentage_buckets": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "request_id": {
            "description": "Seeds the percentage-split draw so a run is reproducible.",
            "type": "string"
          },
          "version_number": {
            "description": "Omit or set null to simulate the current draft; supply a positive existing deployed version to simulate history. Zero is invalid.",
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "DynamicRouteSimulationResult": {
        "properties": {
          "overrides": {
            "properties": {
              "classifier_cases": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "conditional_cases": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "model_outcomes": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "percentage_buckets": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "path": {
            "items": {
              "properties": {
                "model": {
                  "type": "string"
                },
                "node_id": {
                  "type": "string"
                },
                "node_label": {
                  "type": "string"
                },
                "node_type": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string"
                },
                "output": {
                  "type": "string"
                },
                "ranked_models": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "target_node_id": {
                  "type": "string"
                }
              },
              "required": [
                "node_id",
                "node_type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "result": {
            "type": "object"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "path",
          "overrides"
        ],
        "type": "object"
      },
      "DynamicRouteSummary": {
        "properties": {
          "active_version_number": {
            "type": "integer"
          },
          "active_version_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "deleted_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "draft_dirty": {
            "type": "boolean"
          },
          "invocation_model": {
            "type": "string"
          },
          "latest_version_number": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "uuid": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "uuid",
          "name",
          "display_name",
          "invocation_model",
          "description",
          "draft_dirty",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "DynamicRouteUndeployRequest": {
        "properties": {
          "expected_active_version_number": {
            "description": "Optional active version precondition; zero means already unpublished. A stale positive version returns 409 even when the route is now unpublished.",
            "minimum": 0,
            "type": "integer"
          },
          "expected_route_uuid": {
            "description": "Optional route identity precondition; a recycled route name does not satisfy it.",
            "format": "uuid",
            "type": "string"
          },
          "idempotency_key": {
            "description": "Unique undeploy operation identifier. A replay returns the original affected version without clearing a newer deployment.",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DynamicRouteValidationIssue": {
        "properties": {
          "code": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "node_id": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "severity"
        ],
        "type": "object"
      },
      "DynamicRouteVersion": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "draft_revision": {
            "type": "integer"
          },
          "graph": {
            "description": "The graph this version serves (DynamicRouteGraph).",
            "type": "object"
          },
          "layout": {
            "description": "Editor canvas positions keyed by element id.",
            "type": "object"
          },
          "note": {
            "type": "string"
          },
          "route_name": {
            "type": "string"
          },
          "uuid": {
            "format": "uuid",
            "type": "string"
          },
          "validation": {
            "description": "Validation issues recorded at deploy time (DynamicRouteValidationIssue).",
            "type": "array"
          },
          "version_number": {
            "type": "integer"
          }
        },
        "required": [
          "uuid",
          "version_number",
          "route_name",
          "description",
          "note",
          "draft_revision",
          "created_at"
        ],
        "type": "object"
      },
      "DynamicRouteVersionSummary": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "uuid": {
            "format": "uuid",
            "type": "string"
          },
          "version_number": {
            "type": "integer"
          }
        },
        "required": [
          "uuid",
          "version_number",
          "note",
          "created_at"
        ],
        "type": "object"
      },
      "EmbeddingsDataItem": {
        "properties": {
          "embedding": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "index": {
            "type": "integer"
          },
          "object": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "index",
          "embedding"
        ],
        "type": "object"
      },
      "EmbeddingsRequest": {
        "properties": {
          "dimensions": {
            "type": "integer"
          },
          "encoding_format": {
            "type": "string"
          },
          "input": {
            "description": "Any value"
          },
          "model": {
            "type": "string"
          },
          "user": {
            "type": "string"
          }
        },
        "required": [
          "input",
          "model"
        ],
        "type": "object"
      },
      "EmbeddingsResponse": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "embedding": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "index": {
                  "type": "integer"
                },
                "object": {
                  "type": "string"
                }
              },
              "required": [
                "object",
                "index",
                "embedding"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "prompt_tokens": {
                "type": "integer"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "prompt_tokens",
              "total_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "object",
          "data",
          "model",
          "usage"
        ],
        "type": "object"
      },
      "EmbeddingsUsageInfo": {
        "properties": {
          "prompt_tokens": {
            "type": "integer"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "prompt_tokens",
          "total_tokens"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "properties": {
          "code": {
            "type": "string"
          },
          "details": {
            "description": "Any value"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "description": "Any value"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "EvaluationAnswer": {
        "oneOf": [
          {
            "additionalProperties": true,
            "properties": {
              "noul": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "type": {
                "enum": [
                  "noul"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "noul"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "choice": {
                "type": "string"
              },
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "probabilities": {
                "additionalProperties": {
                  "maximum": 1,
                  "minimum": 0,
                  "type": "number"
                },
                "type": "object"
              },
              "type": {
                "enum": [
                  "choice"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "choice",
              "confidence",
              "probabilities"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "legend": {
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    }
                  ]
                },
                "type": "object"
              },
              "probabilities": {
                "additionalProperties": {
                  "maximum": 1,
                  "minimum": 0,
                  "type": "number"
                },
                "type": "object"
              },
              "score": {
                "maximum": 9,
                "minimum": 0,
                "type": "number"
              },
              "type": {
                "enum": [
                  "score"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "score",
              "confidence",
              "probabilities",
              "legend"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "box": {
                "description": "Fractions of the image from its top-left corner: `left` and `right` of the width, `top` and `bottom` of the height; `left` \u003c `right`, `top` \u003c `bottom`.",
                "properties": {
                  "bottom": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  },
                  "left": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  },
                  "right": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  },
                  "top": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "top",
                  "bottom",
                  "left",
                  "right"
                ],
                "type": "object"
              },
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "type": {
                "enum": [
                  "box"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "box",
              "confidence"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "spans": {
                "description": "Every match, empty when nothing matched.",
                "items": {
                  "$ref": "#/components/schemas/LocateSpan"
                },
                "type": "array"
              },
              "type": {
                "enum": [
                  "locate"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "spans"
            ],
            "type": "object"
          }
        ]
      },
      "EvaluationAsset": {
        "additionalProperties": false,
        "description": "An image, as base64 in `data_base64` with its `format`, or as the multipart file part named by `part` (which wins when both are set).",
        "properties": {
          "data_base64": {
            "contentEncoding": "base64",
            "description": "Standard base64 with padding, no whitespace and no `data:` prefix.",
            "type": "string"
          },
          "format": {
            "description": "Required with `data_base64`.",
            "enum": [
              "png",
              "jpg",
              "jpeg"
            ],
            "type": "string"
          },
          "part": {
            "description": "Name of the multipart file part holding the image.",
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "enum": [
              "image"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "EvaluationQuestion": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "criteria": {
                "additionalProperties": false,
                "properties": {
                  "false": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "items": {},
                        "type": "array"
                      }
                    ]
                  },
                  "true": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "items": {},
                        "type": "array"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              "instructions": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              },
              "type": {
                "enum": [
                  "noul"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "criteria": {
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    }
                  ]
                },
                "maxProperties": 255,
                "minProperties": 1,
                "type": "object"
              },
              "instructions": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              },
              "type": {
                "enum": [
                  "choice"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions",
              "criteria"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "criteria": {
                "items": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    }
                  ]
                },
                "maxItems": 10,
                "minItems": 2,
                "type": "array"
              },
              "instructions": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              },
              "type": {
                "enum": [
                  "score"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions",
              "criteria"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "instructions": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              },
              "type": {
                "enum": [
                  "box"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Finds every span of the string `state` that matches `instructions` (for example `email address`). Models with the `locate` capability only (Perplexity Decider v1.3); `state` must be a string.",
            "properties": {
              "criteria": {
                "description": "Ignored."
              },
              "instructions": {
                "minLength": 1,
                "type": "string"
              },
              "type": {
                "enum": [
                  "locate"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "instructions"
            ],
            "type": "object"
          }
        ]
      },
      "EvaluationRequest": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "assets": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/EvaluationAsset"
                },
                "description": "TypeSafe models only, with the `TypeSafe-Danger-Zone-Images: true` header. Images keyed by a placeholder written where each belongs in the state, instructions or criteria (inside any string value, not object keys). Every asset must be referenced.",
                "propertyNames": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                },
                "type": "object"
              },
              "document_file_ids": {
                "description": "Gemini Decision 1 only. Ordered IDs of PDFs uploaded to POST /v3/files with purpose=ocr_input in this project. Shares a limit of 16 files and 32 MiB before encoding with media_file_ids. Set state to an empty string for file-only input.",
                "items": {
                  "pattern": "^file_[0-9A-Za-z]{22}$",
                  "type": "string"
                },
                "maxItems": 16,
                "type": "array"
              },
              "media_file_ids": {
                "description": "Gemini Decision 1 only. Ordered IDs of images, audio or video uploaded to POST /v3/files with purpose=reference_media in this project. Shared limits apply across both file fields.",
                "items": {
                  "pattern": "^file_[0-9A-Za-z]{22}$",
                  "type": "string"
                },
                "maxItems": 16,
                "type": "array"
              },
              "model": {
                "minLength": 1,
                "not": {
                  "enum": [
                    "greenpt/metis"
                  ]
                },
                "type": "string"
              },
              "questions": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/EvaluationQuestion"
                },
                "minProperties": 1,
                "type": "object"
              },
              "state": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              }
            },
            "required": [
              "model",
              "state",
              "questions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "model": {
                "enum": [
                  "greenpt/metis"
                ],
                "minLength": 1,
                "type": "string"
              },
              "questions": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/GreenPTEvaluationQuestion"
                },
                "description": "Joint evaluation of up to 32 questions. The reserved key __proto__ is forbidden anywhere in the request, including nested state, instructions and criteria.",
                "maxProperties": 32,
                "minProperties": 1,
                "propertyNames": {
                  "maxLength": 128,
                  "minLength": 1,
                  "not": {
                    "enum": [
                      "__proto__"
                    ]
                  },
                  "type": "string"
                },
                "type": "object"
              },
              "state": {
                "oneOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              }
            },
            "required": [
              "model",
              "state",
              "questions"
            ],
            "type": "object"
          }
        ]
      },
      "EvaluationResponse": {
        "oneOf": [
          {
            "properties": {
              "answers": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/EvaluationAnswer"
                },
                "type": "object"
              },
              "model": {
                "not": {
                  "enum": [
                    "metis"
                  ]
                },
                "type": "string"
              },
              "usage": {
                "$ref": "#/components/schemas/EvaluationUsage"
              }
            },
            "required": [
              "model",
              "answers",
              "usage"
            ],
            "type": "object"
          },
          {
            "properties": {
              "answers": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/GreenPTEvaluationAnswer"
                },
                "type": "object"
              },
              "model": {
                "enum": [
                  "metis"
                ],
                "type": "string"
              },
              "usage": {
                "$ref": "#/components/schemas/GreenPTEvaluationUsage"
              }
            },
            "required": [
              "model",
              "answers",
              "usage"
            ],
            "type": "object"
          }
        ]
      },
      "EvaluationUsage": {
        "properties": {
          "input_tokens": {
            "minimum": 0,
            "type": "integer"
          },
          "input_tokens_details": {
            "description": "The part of input_tokens served from the provider's prompt cache, billed at the model's cached-input price. Present only when the provider reports it.",
            "properties": {
              "cached_tokens": {
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "cached_tokens"
            ],
            "type": "object"
          },
          "output_tokens": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "type": "object"
      },
      "ForecastRequest": {
        "additionalProperties": true,
        "properties": {
          "clip_nonnegative": {
            "default": true,
            "description": "Floor forecasts at 0 for a series whose history is never negative.",
            "type": "boolean"
          },
          "model": {
            "description": "A forecasting model, such as `timestral-209m` (the model's pool), or an endpoint id, which pins that endpoint. List them with `GET /v3/models?type=forecast`.",
            "type": "string"
          },
          "prediction_length": {
            "description": "Steps to forecast.",
            "maximum": 8192,
            "minimum": 1,
            "type": "integer"
          },
          "quantile_levels": {
            "description": "Levels to return, from 0.01, 0.05, 0.1, ..., 0.9, 0.95, 0.99. All 21 by default.",
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "series": {
            "description": "Series forecast in one batch. Every series needs the same number of variates and covariate rows; shorter ones are left-padded with missing values.",
            "items": {
              "additionalProperties": true,
              "properties": {
                "categorical_known_covariates": {
                  "description": "Category codes over the history and the forecast.",
                  "items": {
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "categorical_past_covariates": {
                  "description": "Category codes (any numbers) over the history only.",
                  "items": {
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "known_covariates": {
                  "description": "Rows known over the history and the forecast, each as long as the target plus `prediction_length`.",
                  "items": {
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "past_covariates": {
                  "description": "Rows known over the history only, each as long as the target.",
                  "items": {
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "target": {
                  "description": "The history: a list of numbers, or a list of equally long lists for several variates forecast jointly. `null` is a missing value.",
                  "items": {
                    "type": [
                      "number",
                      "null",
                      "array"
                    ]
                  },
                  "type": "array"
                }
              },
              "required": [
                "target"
              ],
              "type": "object"
            },
            "maxItems": 1024,
            "minItems": 1,
            "type": "array"
          },
          "symmetric_averaging": {
            "default": true,
            "description": "Also forecast the negated series and average the two.",
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "prediction_length",
          "series"
        ],
        "type": "object"
      },
      "ForecastResponse": {
        "additionalProperties": true,
        "properties": {
          "forecasts": {
            "description": "One forecast per series, in request order.",
            "items": {
              "properties": {
                "median": {
                  "description": "`prediction_length` numbers for a one-variate target, or one such list per variate.",
                  "items": {
                    "type": [
                      "number",
                      "array"
                    ]
                  },
                  "type": "array"
                },
                "quantiles": {
                  "additionalProperties": {
                    "description": "`prediction_length` numbers for a one-variate target, or one such list per variate.",
                    "items": {
                      "type": [
                        "number",
                        "array"
                      ]
                    },
                    "type": "array"
                  },
                  "description": "Forecasts by level, keyed as the level is written (\"0.1\").",
                  "type": "object"
                }
              },
              "required": [
                "median",
                "quantiles"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "model": {
            "type": "string"
          },
          "prediction_length": {
            "type": "integer"
          },
          "quantile_levels": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "usage": {
            "properties": {
              "forecast_steps": {
                "description": "Time steps forecast over every target variate, billed at the endpoint's output price per million.",
                "type": "integer"
              },
              "input_steps": {
                "description": "Time steps read over every target variate and covariate row, billed at the endpoint's input price per million.",
                "type": "integer"
              },
              "series": {
                "type": "integer"
              }
            },
            "required": [
              "series",
              "input_steps",
              "forecast_steps"
            ],
            "type": "object"
          }
        },
        "required": [
          "model",
          "prediction_length",
          "quantile_levels",
          "forecasts",
          "usage"
        ],
        "type": "object"
      },
      "GenerateContentCandidate": {
        "properties": {
          "content": {
            "properties": {
              "parts": {
                "items": {
                  "properties": {
                    "codeExecutionResult": {
                      "type": "object"
                    },
                    "executableCode": {
                      "type": "object"
                    },
                    "functionCall": {
                      "type": "object"
                    },
                    "inlineData": {
                      "type": "object"
                    },
                    "text": {
                      "type": "string"
                    },
                    "thought": {
                      "type": "boolean"
                    },
                    "thoughtSignature": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "role": {
                "type": "string"
              }
            },
            "required": [
              "parts"
            ],
            "type": "object"
          },
          "finishReason": {
            "type": "string"
          },
          "groundingMetadata": {
            "type": "object"
          },
          "index": {
            "type": "integer"
          },
          "urlContextMetadata": {
            "type": "object"
          }
        },
        "required": [
          "content",
          "index"
        ],
        "type": "object"
      },
      "GenerateContentContent": {
        "properties": {
          "parts": {
            "items": {
              "properties": {
                "codeExecutionResult": {
                  "type": "object"
                },
                "executableCode": {
                  "type": "object"
                },
                "functionCall": {
                  "type": "object"
                },
                "inlineData": {
                  "type": "object"
                },
                "text": {
                  "type": "string"
                },
                "thought": {
                  "type": "boolean"
                },
                "thoughtSignature": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "parts"
        ],
        "type": "object"
      },
      "GenerateContentPart": {
        "properties": {
          "codeExecutionResult": {
            "type": "object"
          },
          "executableCode": {
            "type": "object"
          },
          "functionCall": {
            "type": "object"
          },
          "inlineData": {
            "type": "object"
          },
          "text": {
            "type": "string"
          },
          "thought": {
            "type": "boolean"
          },
          "thoughtSignature": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "GenerateContentResponse": {
        "properties": {
          "candidates": {
            "items": {
              "properties": {
                "content": {
                  "properties": {
                    "parts": {
                      "items": {
                        "properties": {
                          "codeExecutionResult": {
                            "type": "object"
                          },
                          "executableCode": {
                            "type": "object"
                          },
                          "functionCall": {
                            "type": "object"
                          },
                          "inlineData": {
                            "type": "object"
                          },
                          "text": {
                            "type": "string"
                          },
                          "thought": {
                            "type": "boolean"
                          },
                          "thoughtSignature": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "role": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "parts"
                  ],
                  "type": "object"
                },
                "finishReason": {
                  "type": "string"
                },
                "groundingMetadata": {
                  "type": "object"
                },
                "index": {
                  "type": "integer"
                },
                "urlContextMetadata": {
                  "type": "object"
                }
              },
              "required": [
                "content",
                "index"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "modelVersion": {
            "type": "string"
          },
          "responseId": {
            "type": "string"
          },
          "usageMetadata": {
            "properties": {
              "cachedContentTokenCount": {
                "type": "integer"
              },
              "candidatesTokenCount": {
                "type": "integer"
              },
              "opper": {
                "type": "object"
              },
              "promptTokenCount": {
                "type": "integer"
              },
              "thoughtsTokenCount": {
                "type": "integer"
              },
              "totalTokenCount": {
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "candidates"
        ],
        "type": "object"
      },
      "GenerateContentUsageMetadata": {
        "properties": {
          "cachedContentTokenCount": {
            "type": "integer"
          },
          "candidatesTokenCount": {
            "type": "integer"
          },
          "opper": {
            "type": "object"
          },
          "promptTokenCount": {
            "type": "integer"
          },
          "thoughtsTokenCount": {
            "type": "integer"
          },
          "totalTokenCount": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "GenerationConfig": {
        "properties": {
          "max_output_tokens": {
            "type": "integer"
          },
          "response_json_schema": {
            "type": "object"
          },
          "response_mime_type": {
            "type": "string"
          },
          "response_schema": {
            "type": "object"
          },
          "seed": {
            "type": "integer"
          },
          "stop_sequences": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "temperature": {
            "type": "number"
          },
          "thinking_config": {
            "properties": {
              "include_thoughts": {
                "type": "boolean"
              },
              "thinking_budget": {
                "type": "integer"
              },
              "thinking_level": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "thinking_level": {
            "type": "string"
          },
          "thinking_summaries": {
            "type": "string"
          },
          "tool_choice": {
            "description": "Any value"
          },
          "top_k": {
            "type": "integer"
          },
          "top_p": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "GetSpanResponse": {
        "properties": {
          "data": {
            "properties": {
              "data": {
                "properties": {
                  "cost": {
                    "type": "number"
                  },
                  "evaluations": {
                    "items": {
                      "properties": {
                        "cost": {
                          "type": "number"
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "duration_ms": {
                          "type": "integer"
                        },
                        "evaluator_type": {
                          "type": "string"
                        },
                        "explanation": {
                          "type": "string"
                        },
                        "flagged": {
                          "type": "boolean"
                        },
                        "generation_id": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "model": {
                          "type": "string"
                        },
                        "rule_id": {
                          "type": "string"
                        },
                        "score": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "generation_id",
                        "flagged",
                        "created_at"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "generation_id": {
                    "type": "string"
                  },
                  "input_truncated": {
                    "type": "boolean"
                  },
                  "instructions": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string"
                  },
                  "observations": {
                    "type": "string"
                  },
                  "output_truncated": {
                    "type": "boolean"
                  },
                  "score": {
                    "type": "integer"
                  },
                  "scorer_context": {
                    "type": "object"
                  },
                  "tags": {
                    "type": "object"
                  },
                  "total_tokens": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "end_time": {
                "format": "date-time",
                "type": "string"
              },
              "error": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "input": {
                "description": "Any value"
              },
              "meta": {
                "type": "object"
              },
              "metadata": {
                "type": "object"
              },
              "metrics": {
                "items": {
                  "properties": {
                    "comment": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "dimension": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "value": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "dimension",
                    "value",
                    "created_at"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "name": {
                "type": "string"
              },
              "output": {
                "description": "Any value"
              },
              "parent_id": {
                "type": "string"
              },
              "score": {
                "type": "integer"
              },
              "start_time": {
                "format": "date-time",
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "tags": {
                "type": "object"
              },
              "trace_id": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "trace_id",
              "name"
            ],
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "GetTraceResponse": {
        "properties": {
          "data": {
            "properties": {
              "checks_cost": {
                "type": "number"
              },
              "completion_tokens": {
                "type": "integer"
              },
              "duration_ms": {
                "type": "integer"
              },
              "end_time": {
                "format": "date-time",
                "type": "string"
              },
              "evaluation_cost": {
                "type": "number"
              },
              "events": {
                "items": {
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "span_id": {
                      "type": "string"
                    },
                    "span_uuid": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "span_id",
                    "kind",
                    "source",
                    "data"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "id": {
                "type": "string"
              },
              "input": {
                "type": "string"
              },
              "model_cost": {
                "type": "number"
              },
              "name": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "prompt_tokens": {
                "type": "integer"
              },
              "span_count": {
                "type": "integer"
              },
              "spans": {
                "items": {
                  "properties": {
                    "data": {
                      "properties": {
                        "cost": {
                          "type": "number"
                        },
                        "evaluations": {
                          "items": {
                            "properties": {
                              "cost": {
                                "type": "number"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "duration_ms": {
                                "type": "integer"
                              },
                              "evaluator_type": {
                                "type": "string"
                              },
                              "explanation": {
                                "type": "string"
                              },
                              "flagged": {
                                "type": "boolean"
                              },
                              "generation_id": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "model": {
                                "type": "string"
                              },
                              "rule_id": {
                                "type": "string"
                              },
                              "score": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "generation_id",
                              "flagged",
                              "created_at"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "generation_id": {
                          "type": "string"
                        },
                        "input_truncated": {
                          "type": "boolean"
                        },
                        "instructions": {
                          "type": "string"
                        },
                        "model": {
                          "type": "string"
                        },
                        "observations": {
                          "type": "string"
                        },
                        "output_truncated": {
                          "type": "boolean"
                        },
                        "score": {
                          "type": "integer"
                        },
                        "scorer_context": {
                          "type": "object"
                        },
                        "tags": {
                          "type": "object"
                        },
                        "total_tokens": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "end_time": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "input": {
                      "description": "Any value"
                    },
                    "meta": {
                      "type": "object"
                    },
                    "metadata": {
                      "type": "object"
                    },
                    "metrics": {
                      "items": {
                        "properties": {
                          "comment": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "dimension": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "dimension",
                          "value",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "name": {
                      "type": "string"
                    },
                    "output": {
                      "description": "Any value"
                    },
                    "parent_id": {
                      "type": "string"
                    },
                    "score": {
                      "type": "integer"
                    },
                    "start_time": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "object"
                    },
                    "trace_id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "trace_id",
                    "name"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "start_time": {
                "format": "date-time",
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "span_count",
              "spans"
            ],
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "GoogleCompatModel": {
        "properties": {
          "description": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "inputTokenLimit": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "outputTokenLimit": {
            "type": "integer"
          },
          "supportedGenerationMethods": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "thinking": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "supportedGenerationMethods"
        ],
        "type": "object"
      },
      "GoogleCompatModelsListResponse": {
        "properties": {
          "models": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "inputTokenLimit": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "outputTokenLimit": {
                  "type": "integer"
                },
                "supportedGenerationMethods": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "thinking": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "supportedGenerationMethods"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "nextPageToken": {
            "type": "string"
          }
        },
        "required": [
          "models"
        ],
        "type": "object"
      },
      "GreenPTEvaluationAnswer": {
        "oneOf": [
          {
            "additionalProperties": true,
            "properties": {
              "noul": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "type": {
                "enum": [
                  "noul"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "noul"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "choice": {
                "type": "string"
              },
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "probabilities": {
                "additionalProperties": {
                  "maximum": 1,
                  "minimum": 0,
                  "type": "number"
                },
                "type": "object"
              },
              "type": {
                "enum": [
                  "choice"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "choice",
              "confidence",
              "probabilities"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "legend": {
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    }
                  ]
                },
                "type": "object"
              },
              "probabilities": {
                "additionalProperties": {
                  "maximum": 1,
                  "minimum": 0,
                  "type": "number"
                },
                "type": "object"
              },
              "score": {
                "maximum": 9,
                "minimum": 0,
                "type": "number"
              },
              "type": {
                "enum": [
                  "score"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "score",
              "confidence",
              "probabilities",
              "legend"
            ],
            "type": "object"
          }
        ]
      },
      "GreenPTEvaluationQuestion": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "criteria": {
                "additionalProperties": false,
                "properties": {
                  "false": {
                    "oneOf": [
                      {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      {
                        "type": "object"
                      },
                      {
                        "items": {},
                        "type": "array"
                      }
                    ]
                  },
                  "true": {
                    "oneOf": [
                      {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      {
                        "type": "object"
                      },
                      {
                        "items": {},
                        "type": "array"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              "instructions": {
                "oneOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              },
              "type": {
                "enum": [
                  "noul"
                ],
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "criteria": {
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    }
                  ]
                },
                "maxProperties": 255,
                "minProperties": 2,
                "propertyNames": {
                  "not": {
                    "enum": [
                      "__proto__"
                    ]
                  }
                },
                "type": "object"
              },
              "instructions": {
                "oneOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              },
              "type": {
                "enum": [
                  "choice"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "criteria"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "criteria": {
                "items": {
                  "oneOf": [
                    {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    }
                  ]
                },
                "maxItems": 10,
                "minItems": 2,
                "type": "array"
              },
              "instructions": {
                "oneOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  {
                    "type": "object"
                  },
                  {
                    "items": {},
                    "type": "array"
                  }
                ]
              },
              "type": {
                "enum": [
                  "score"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "criteria"
            ],
            "type": "object"
          }
        ]
      },
      "GreenPTEvaluationUsage": {
        "properties": {
          "input_tokens": {
            "minimum": 0,
            "type": "integer"
          },
          "output_tokens": {
            "enum": [
              0
            ],
            "type": "integer"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "type": "object"
      },
      "GuardInfo": {
        "properties": {
          "code": {
            "type": "string"
          },
          "findings": {
            "items": {
              "description": "Any value"
            },
            "type": "array"
          },
          "flagged": {
            "type": "boolean"
          },
          "phase": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "rule_id": {
            "type": "string"
          },
          "rule_name": {
            "type": "string"
          },
          "scope_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "flagged"
        ],
        "type": "object"
      },
      "GuardrailConfig": {
        "properties": {
          "action": {
            "type": "string"
          },
          "applies_to": {
            "type": "string"
          },
          "categories": {
            "items": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "preset": {
                  "type": "string"
                },
                "statement": {
                  "type": "string"
                },
                "threshold": {
                  "type": "number"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "check": {
            "type": "string"
          },
          "custom_patterns": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "engine": {
            "type": "string"
          },
          "exceptions": {
            "items": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "regex": {
                  "type": "string"
                }
              },
              "required": [
                "regex"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "handle": {
            "type": "string"
          },
          "invoke": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "on_error": {
            "type": "string"
          },
          "patterns": {
            "items": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "regex": {
                  "type": "string"
                }
              },
              "required": [
                "regex"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "presets": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "prompt": {
            "type": "string"
          },
          "replacement": {
            "type": "string"
          },
          "rule_id": {
            "type": "string"
          },
          "rule_name": {
            "type": "string"
          },
          "scope_type": {
            "type": "string"
          },
          "threshold": {
            "type": "number"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ImageJobResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status_url"
        ],
        "type": "object"
      },
      "ImageRequest": {
        "properties": {
          "aspect_ratio": {
            "description": "Shape such as `16:9`, for models that list `params.image.aspect_ratios`.",
            "type": "string"
          },
          "async": {
            "description": "Run generation on the background worker and return a job to poll (202) instead of waiting inline (200). Use for slow models. Single-image only.",
            "type": "boolean"
          },
          "callback_url": {
            "description": "HTTPS URL that receives a signed `image.completed` or `image.failed` webhook when the job ends, so you do not have to poll. Rules, each answered with a 400 that names it: https only, port 443 (or none), no `user:password@`, no `#fragment`, at most 2048 characters, and a host that is a public IP address or a public name resolving only to public addresses (no localhost, private, link-local, metadata or internal names). Verify the signature with the project's secret from GET /v3/webhooks/secret; see the `jobCompleted` webhook for the payload, headers and retries. Only with `async: true`; a synchronous request with `callback_url` answers 400.",
            "type": "string"
          },
          "image": {
            "description": "The image to edit: URL, data-URI or `file_\u003cid\u003e`. Needs the `image_edit` capability.",
            "type": "string"
          },
          "mask": {
            "description": "Inpaint mask marking the region of `image` to change.",
            "type": "string"
          },
          "max_retries": {
            "default": 2,
            "description": "Retries on the same endpoint when the provider rejects the call before doing any work (HTTP 429 or a gateway 502/503/504 with no result, or a connection that never reached it). Only the successful attempt is billed. Default 2 / max 3; 0 turns retries off.",
            "maximum": 3,
            "minimum": 0,
            "type": "integer"
          },
          "model": {
            "description": "A model id from GET /v3/images/models, such as `openai/gpt-image-2.5-flare`. Ids name the provider; a bare model name answers 400 with the ids that serve it.",
            "type": "string"
          },
          "n": {
            "type": "integer"
          },
          "parameters": {
            "description": "Provider settings, forwarded verbatim. The keys each model takes are listed with descriptions in its `params.image.parameters` (GET /v3/images/models).",
            "type": "object"
          },
          "prompt": {
            "type": "string"
          },
          "quality": {
            "description": "A tier from the model's `params.image.qualities`. On Gemini image models it also sets the size: the default gives about 1K, `high` 2K and `4k` 4K.",
            "type": "string"
          },
          "reference_images": {
            "description": "Further images the result draws on (subject, product, style).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "resolution": {
            "description": "Output-resolution tier for models that declare one (e.g. xAI 1k/2k). Separate axis from quality.",
            "type": "string"
          },
          "response_format": {
            "type": "string"
          },
          "size": {
            "description": "Pixel size `WxH`. A model with `params.image.size_constraints` takes any size inside them (GPT Image: 2K is `2048x2048`, 4K `3840x2160`), else one of `params.image.sizes`.",
            "type": "string"
          },
          "store": {
            "description": "Persist each generated image to /v3/files and return a reusable file_id per image. Defaults to false; set true to store.",
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "prompt"
        ],
        "type": "object"
      },
      "ImageResponse": {
        "properties": {
          "created": {
            "type": "integer"
          },
          "data": {
            "items": {
              "properties": {
                "b64_json": {
                  "type": "string"
                },
                "file_id": {
                  "type": "string"
                },
                "mime_type": {
                  "type": "string"
                },
                "revised_prompt": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "attempts": {
                "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
                "type": "integer"
              },
              "cost": {
                "type": "number"
              },
              "images": {
                "type": "integer"
              }
            },
            "required": [
              "cost",
              "images"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "model",
          "created",
          "data",
          "usage"
        ],
        "type": "object"
      },
      "InteractionsError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "details": {
            "description": "Machine-readable context for the error, when there is any. Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
            "type": "object"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "InteractionsFunction": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          },
          "parameters_json_schema": {
            "description": "Any value"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "InteractionsRequest": {
        "properties": {
          "agent": {
            "type": "string"
          },
          "background": {
            "type": "boolean"
          },
          "cache_control": {
            "description": "Opt in to automatic prompt caching for Anthropic-family models routed through this Gemini-shape endpoint: {\"type\":\"ephemeral\"} (optionally \"ttl\":\"1h\"). Places one moving cache breakpoint on the largest cacheable prefix. Caching is off unless set; no-op on Gemini and other providers with automatic server-side caching. Cache writes cost 1.25x input and reads 0.1x",
            "type": "object"
          },
          "contents": {
            "description": "Any value"
          },
          "custom_model_credentials": {
            "properties": {
              "api_key": {
                "type": "string"
              },
              "base_url": {
                "type": "string"
              },
              "extra": {
                "type": "object"
              },
              "identifier": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "identifier",
              "api_key"
            ],
            "type": "object"
          },
          "generation_config": {
            "properties": {
              "max_output_tokens": {
                "type": "integer"
              },
              "response_json_schema": {
                "type": "object"
              },
              "response_mime_type": {
                "type": "string"
              },
              "response_schema": {
                "type": "object"
              },
              "seed": {
                "type": "integer"
              },
              "stop_sequences": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "temperature": {
                "type": "number"
              },
              "thinking_config": {
                "properties": {
                  "include_thoughts": {
                    "type": "boolean"
                  },
                  "thinking_budget": {
                    "type": "integer"
                  },
                  "thinking_level": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "thinking_level": {
                "type": "string"
              },
              "thinking_summaries": {
                "type": "string"
              },
              "tool_choice": {
                "description": "Any value"
              },
              "top_k": {
                "type": "integer"
              },
              "top_p": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "input": {
            "description": "Any value"
          },
          "metadata": {
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "models": {
            "description": "Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in model (or agent) and the rest here; or omit both and the first entry is the primary. Each entry is any model string: a bare pooled name; a provider/model id; an org alias. Not allowed together with a dynamic/\u003cname\u003e route. At most 10 entries. Which model answered is in the X-Opper-Served-Model header.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "previous_interaction_id": {
            "type": "string"
          },
          "response_format": {
            "type": "object"
          },
          "response_mime_type": {
            "type": "string"
          },
          "safety_settings": {
            "items": {
              "properties": {
                "category": {
                  "type": "string"
                },
                "threshold": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "store": {
            "type": "boolean"
          },
          "stream": {
            "type": "boolean"
          },
          "system_instruction": {
            "properties": {
              "Text": {
                "type": "string"
              }
            },
            "required": [
              "Text"
            ],
            "type": "object"
          },
          "tool_config": {
            "properties": {
              "function_calling_config": {
                "properties": {
                  "allowed_function_names": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "mode": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "tools": {
            "items": {
              "properties": {
                "codeExecution": {
                  "description": "Any value"
                },
                "code_execution": {
                  "description": "Any value"
                },
                "description": {
                  "type": "string"
                },
                "function_declarations": {
                  "items": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object"
                      },
                      "parameters_json_schema": {
                        "description": "Any value"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "googleSearch": {
                  "description": "Any value"
                },
                "googleSearchRetrieval": {
                  "description": "Any value"
                },
                "google_search": {
                  "description": "Any value"
                },
                "google_search_retrieval": {
                  "description": "Any value"
                },
                "name": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                },
                "urlContext": {
                  "description": "Any value"
                },
                "url_context": {
                  "description": "Any value"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "input",
          "contents"
        ],
        "type": "object"
      },
      "InteractionsResponse": {
        "properties": {
          "agent": {
            "type": "string"
          },
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "type": "object"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "previous_interaction_id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "steps": {
            "items": {
              "properties": {
                "arguments": {
                  "type": "object"
                },
                "content": {
                  "items": {
                    "properties": {
                      "data": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "uri": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "signature": {
                  "type": "string"
                },
                "summary": {
                  "properties": {
                    "data": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "usage": {
            "properties": {
              "total_cached_tokens": {
                "type": "integer"
              },
              "total_input_tokens": {
                "type": "integer"
              },
              "total_output_tokens": {
                "type": "integer"
              },
              "total_thought_tokens": {
                "type": "integer"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "InteractionsStep": {
        "properties": {
          "arguments": {
            "type": "object"
          },
          "content": {
            "items": {
              "properties": {
                "data": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "summary": {
            "properties": {
              "data": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "uri": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "InteractionsTool": {
        "properties": {
          "codeExecution": {
            "description": "Any value"
          },
          "code_execution": {
            "description": "Any value"
          },
          "description": {
            "type": "string"
          },
          "function_declarations": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object"
                },
                "parameters_json_schema": {
                  "description": "Any value"
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "googleSearch": {
            "description": "Any value"
          },
          "googleSearchRetrieval": {
            "description": "Any value"
          },
          "google_search": {
            "description": "Any value"
          },
          "google_search_retrieval": {
            "description": "Any value"
          },
          "name": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          },
          "type": {
            "type": "string"
          },
          "urlContext": {
            "description": "Any value"
          },
          "url_context": {
            "description": "Any value"
          }
        },
        "type": "object"
      },
      "InteractionsUsage": {
        "properties": {
          "total_cached_tokens": {
            "type": "integer"
          },
          "total_input_tokens": {
            "type": "integer"
          },
          "total_output_tokens": {
            "type": "integer"
          },
          "total_thought_tokens": {
            "type": "integer"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ListTracesItem": {
        "properties": {
          "duration_ms": {
            "type": "integer"
          },
          "end_time": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "span_count": {
            "type": "integer"
          },
          "start_time": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "span_count"
        ],
        "type": "object"
      },
      "LocateSpan": {
        "additionalProperties": true,
        "properties": {
          "end": {
            "description": "Offset just past the last character (exclusive), in Unicode code points.",
            "minimum": 1,
            "type": "integer"
          },
          "score": {
            "description": "The model's score for the match.",
            "type": "number"
          },
          "start": {
            "description": "Offset of the first character in the input text, counted in Unicode code points.",
            "minimum": 0,
            "type": "integer"
          },
          "text": {
            "description": "The matched text.",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end",
          "text",
          "score"
        ],
        "type": "object"
      },
      "ManagementAPIKey": {
        "properties": {
          "allowed_ips": {
            "description": "The IP addresses and CIDR ranges this key accepts calls from. An empty list accepts any IP.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "kind",
          "allowed_ips"
        ],
        "type": "object"
      },
      "ManagementControlRule": {
        "properties": {
          "allowed_model_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "config": {
            "description": "The rule's configuration; its shape depends on kind. comply and route rules carry a type discriminator (comply: allowlist | retention | budget; route: cache | pool_order); guard and observe rules carry their configuration inline.",
            "type": "object"
          },
          "confirm_file_deletion": {
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "deleted_projects": {
            "items": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "uuid": {
                  "type": "string"
                }
              },
              "required": [
                "uuid",
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "effective_count": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "health": {
            "properties": {
              "reason": {
                "type": "string"
              },
              "skipped_at": {
                "format": "date-time",
                "type": "string"
              }
            },
            "required": [
              "skipped_at",
              "reason"
            ],
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parent_allowlist": {
            "properties": {
              "deny_all": {
                "type": "boolean"
              },
              "endpoints": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "exclude_endpoints": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "exclude_model_keys": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "exclude_models": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "exclude_providers": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "exclude_service_routes": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "exclusion_sets": {
                "items": {
                  "properties": {
                    "except_endpoints": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "except_models": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "exclude_endpoints": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "exclude_models": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "handling": {
                "properties": {
                  "cache_scopes": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "caching": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "human_review": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "logging": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "max_retention_days": {
                    "type": "integer"
                  },
                  "moderation": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "subprocessors_read_content": {
                    "type": "boolean"
                  },
                  "training": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "maker": {
                "properties": {
                  "jurisdiction": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "name": {
                    "description": "Maker slugs. A bare list is the allowed makers; {include, exclude} adds the blocked ones.",
                    "oneOf": [
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      {
                        "properties": {
                          "exclude": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "include": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              "model_keys": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "models": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "pins": {
                "items": {
                  "properties": {
                    "endpoints": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "model_keys": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "models": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "provider": {
                "properties": {
                  "locations": {
                    "properties": {
                      "inference": {
                        "properties": {
                          "exclude": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "include": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "jurisdiction": {
                        "properties": {
                          "exclude": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "include": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "storage": {
                        "properties": {
                          "exclude": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "include": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "name": {
                    "properties": {
                      "exclude": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "include": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "route": {
                    "properties": {
                      "exclude": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "include": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "providers": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "regions": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "service_routes": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "providers",
              "regions",
              "models"
            ],
            "type": "object"
          },
          "schema_version": {
            "type": "integer"
          },
          "scope": {
            "properties": {
              "api_key_ids": {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "member_uuids": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "project_uuids": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "role_names": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "enabled",
          "scope",
          "schema_version",
          "config",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ManagementControlRuleCreateRequest": {
        "properties": {
          "config": {
            "description": "The rule's configuration; shape depends on kind (see ManagementControlRule.config).",
            "type": "object"
          },
          "confirm_file_deletion": {
            "description": "Deprecated and ignored: no rule deletes stored files",
            "type": "boolean"
          },
          "enabled": {
            "description": "Whether the rule is enforced.",
            "type": "boolean"
          },
          "id": {
            "description": "Client-chosen rule id (a UUID). Must be unique in the organization.",
            "type": "string"
          },
          "kind": {
            "description": "What the rule does: guard (input/output checks); observe (LLM-judge scoring); route (cache; pool order); comply (model allowlist; retention; budget).",
            "enum": [
              "guard",
              "observe",
              "route",
              "comply"
            ],
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "type": "string"
          },
          "schema_version": {
            "description": "How the runtime reads config. Omit for the current default; a version this deployment cannot decode is refused.",
            "type": "integer"
          },
          "scope": {
            "description": "Where the rule applies: the whole organization (type org); a set of projects (type projects + project_uuids). A comply budget rule may also cap each member holding a role (type roles + role_names); named members (type members + member_uuids); or named API keys (type api_keys + api_key_ids).",
            "properties": {
              "api_key_ids": {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "member_uuids": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "project_uuids": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "role_names": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "kind",
          "enabled",
          "scope",
          "config"
        ],
        "type": "object"
      },
      "ManagementControlRulePatchRequest": {
        "properties": {
          "config": {
            "description": "Replacement configuration; validated for the rule's kind.",
            "type": "object"
          },
          "confirm_file_deletion": {
            "description": "Deprecated and ignored; see the create request.",
            "type": "boolean"
          },
          "enabled": {
            "description": "Enable or disable the rule.",
            "type": "boolean"
          },
          "name": {
            "description": "New display name.",
            "type": "string"
          },
          "schema_version": {
            "description": "Re-version the config. A version this deployment cannot decode is refused.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ManagementControlScope": {
        "properties": {
          "api_key_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "member_uuids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "project_uuids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "role_names": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ManagementCustomModelCreation": {
        "additionalProperties": false,
        "properties": {
          "custom_model_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "resource_exists": {
            "type": "boolean"
          }
        },
        "required": [
          "idempotency_key",
          "custom_model_uuid",
          "resource_exists"
        ],
        "type": "object"
      },
      "ManagementCustomModelCreationState": {
        "additionalProperties": false,
        "properties": {
          "custom_model_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "initial_change_token": {
            "maxLength": 48,
            "minLength": 48,
            "pattern": "^cmv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "resource_exists": {
            "type": "boolean"
          }
        },
        "required": [
          "idempotency_key",
          "custom_model_uuid",
          "resource_exists",
          "initial_change_token"
        ],
        "type": "object"
      },
      "ManagementCustomModelMetadata": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credential_present": {
            "description": "Whether a nonempty credential is stored; does not verify validity, decryption, or provider access.",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "identifier": {
            "description": "Stored legacy provider identifier; not a resolved catalog route or a promise of runtime availability.",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "identifier",
          "provider",
          "type",
          "credential_present",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ManagementCustomModelUpdateOperation": {
        "additionalProperties": false,
        "properties": {
          "custom_model_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "resource_exists": {
            "type": "boolean"
          },
          "result_matches_current_state": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "idempotency_key",
          "custom_model_uuid",
          "resource_exists",
          "result_matches_current_state"
        ],
        "type": "object"
      },
      "ManagementInvite": {
        "properties": {
          "accepted": {
            "description": "Whether the invitation has been accepted.",
            "type": "boolean"
          },
          "accepted_at": {
            "description": "When the invitation was accepted. Absent until then.",
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "description": "The invited address.",
            "type": "string"
          },
          "expires_at": {
            "description": "When the link stops working: four weeks after the invitation was sent or last resent.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Invitation id. Pass it to DELETE /management/v1/invites/{id}.",
            "type": "integer"
          },
          "role": {
            "description": "The role the invitee joins with.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "accepted"
        ],
        "type": "object"
      },
      "ManagementMember": {
        "properties": {
          "created_at": {
            "description": "When the person's Opper account was created (not when they joined this organization).",
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "description": "The member's email address. An empty string when none is on file.",
            "type": "string"
          },
          "is_owner": {
            "description": "True for the one member ownership resolves to. The owner cannot be removed through this API; ownership is transferred in the platform.",
            "type": "boolean"
          },
          "name": {
            "description": "The member's display name. An empty string when none is set.",
            "type": "string"
          },
          "role": {
            "description": "The member's effective role: owner, admin, developer, viewer, or the name of one of the organization's custom roles. An empty string for a blocked member.",
            "type": "string"
          },
          "uuid": {
            "description": "The member's user UUID. Pass it to DELETE /management/v1/members/{user_uuid}.",
            "type": "string"
          }
        },
        "required": [
          "uuid",
          "email",
          "name",
          "role",
          "is_owner"
        ],
        "type": "object"
      },
      "ManagementMemberRole": {
        "additionalProperties": false,
        "properties": {
          "blocked": {
            "type": "boolean"
          },
          "change_token": {
            "maxLength": 49,
            "minLength": 49,
            "pattern": "^omrv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "directory_managed": {
            "type": "boolean"
          },
          "member_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "organization_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "owner": {
            "type": "boolean"
          },
          "role": {
            "type": "string"
          },
          "stored_role": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "organization_uuid",
          "member_uuid",
          "stored_role",
          "role",
          "directory_managed",
          "owner",
          "blocked",
          "change_token"
        ],
        "type": "object"
      },
      "ManagementOrganizationBalance": {
        "properties": {
          "balance_cents": {
            "description": "Prepaid credit left, in USD cents. Can be negative after the last calls of a run.",
            "type": "integer"
          },
          "balance_dollars": {
            "type": "number"
          },
          "block_reason": {
            "description": "Why calls are refused; present only when blocked.",
            "enum": [
              "balance_exhausted",
              "org_spend_cap_hit",
              "fraud_review"
            ],
            "type": "string"
          },
          "blocked": {
            "description": "True when the organization's calls are refused right now.",
            "type": "boolean"
          },
          "currency": {
            "enum": [
              "usd"
            ],
            "type": "string"
          },
          "spend": {
            "properties": {
              "budget_period": {
                "enum": [
                  "day",
                  "week",
                  "month",
                  "total"
                ],
                "type": "string"
              },
              "currency": {
                "enum": [
                  "usd"
                ],
                "type": "string"
              },
              "limit_cents": {
                "description": "Budget in USD cents; null when none targets this scope.",
                "type": "integer"
              },
              "limit_scope": {
                "enum": [
                  "project",
                  "organization"
                ],
                "type": "string"
              },
              "period_end": {
                "description": "Absent for a total budget.",
                "format": "date-time",
                "type": "string"
              },
              "period_start": {
                "format": "date-time",
                "type": "string"
              },
              "remaining_cents": {
                "description": "Budget left, at least 0.",
                "type": "integer"
              },
              "spent_cents": {
                "type": "integer"
              },
              "spent_dollars": {
                "type": "number"
              }
            },
            "required": [
              "currency",
              "spent_cents",
              "spent_dollars",
              "limit_cents",
              "remaining_cents",
              "limit_scope",
              "period_start"
            ],
            "type": "object"
          }
        },
        "required": [
          "currency",
          "balance_cents",
          "balance_dollars",
          "spend",
          "blocked"
        ],
        "type": "object"
      },
      "ManagementOrganizationModelList": {
        "properties": {
          "compat_model_list": {
            "enum": [
              "all",
              "simplified",
              "recommended",
              "none"
            ],
            "type": "string"
          },
          "compat_model_list_dynamic_routes": {
            "type": "boolean"
          },
          "compat_model_list_enforced": {
            "type": "boolean"
          },
          "organization_uuid": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "organization_uuid",
          "compat_model_list",
          "compat_model_list_dynamic_routes",
          "compat_model_list_enforced"
        ],
        "type": "object"
      },
      "ManagementProject": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "spend": {
            "description": "Present when a management key also holds billing:read. The project's spend in the current window of the budget targeting it directly, with the budget and what is left; without one, its spend this billing period. An organization budget is never shown here.",
            "properties": {
              "budget_period": {
                "enum": [
                  "day",
                  "week",
                  "month",
                  "total"
                ],
                "type": "string"
              },
              "currency": {
                "enum": [
                  "usd"
                ],
                "type": "string"
              },
              "limit_cents": {
                "description": "Budget in USD cents; null when none targets this scope.",
                "type": "integer"
              },
              "limit_scope": {
                "enum": [
                  "project",
                  "organization"
                ],
                "type": "string"
              },
              "period_end": {
                "description": "Absent for a total budget.",
                "format": "date-time",
                "type": "string"
              },
              "period_start": {
                "format": "date-time",
                "type": "string"
              },
              "remaining_cents": {
                "description": "Budget left, at least 0.",
                "type": "integer"
              },
              "spent_cents": {
                "type": "integer"
              },
              "spent_dollars": {
                "type": "number"
              }
            },
            "required": [
              "currency",
              "spent_cents",
              "spent_dollars",
              "limit_cents",
              "remaining_cents",
              "limit_scope",
              "period_start"
            ],
            "type": "object"
          },
          "uuid": {
            "type": "string"
          }
        },
        "required": [
          "uuid",
          "name",
          "description"
        ],
        "type": "object"
      },
      "ManagementProjectAccessPolicy": {
        "additionalProperties": false,
        "properties": {
          "change_token": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "organization",
              "restricted"
            ],
            "type": "string"
          },
          "organization_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "project_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "revision": {
            "type": "integer"
          },
          "role_keys": {
            "items": {
              "type": "string"
            },
            "maxItems": 500,
            "type": "array"
          },
          "user_uuids": {
            "items": {
              "type": "string"
            },
            "maxItems": 500,
            "type": "array"
          }
        },
        "required": [
          "organization_uuid",
          "project_uuid",
          "mode",
          "role_keys",
          "user_uuids",
          "revision",
          "change_token"
        ],
        "type": "object"
      },
      "ManagementProjectModelList": {
        "properties": {
          "compat_model_list": {
            "enum": [
              "all",
              "simplified",
              "recommended",
              "none"
            ],
            "type": "string"
          },
          "compat_model_list_dynamic_routes": {
            "type": "boolean"
          },
          "compat_model_list_enforced": {
            "type": "boolean"
          },
          "project_name": {
            "type": "string"
          },
          "project_uuid": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "project_uuid",
          "project_name",
          "compat_model_list",
          "compat_model_list_dynamic_routes",
          "compat_model_list_enforced"
        ],
        "type": "object"
      },
      "ManagementRole": {
        "additionalProperties": false,
        "properties": {
          "change_token": {
            "maxLength": 48,
            "minLength": 48,
            "pattern": "^orv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "custom": {
            "type": "boolean"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "effective_permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "organization_uuid": {
            "format": "uuid",
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "priority": {
            "type": "integer"
          }
        },
        "required": [
          "organization_uuid",
          "name",
          "display_name",
          "permissions",
          "effective_permissions",
          "priority",
          "custom",
          "change_token"
        ],
        "type": "object"
      },
      "ManagementRoleCatalog": {
        "additionalProperties": false,
        "properties": {
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "roles": {
            "items": {
              "properties": {
                "change_token": {
                  "type": "string"
                },
                "custom": {
                  "type": "boolean"
                },
                "display_name": {
                  "type": "string"
                },
                "effective_permissions": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "name": {
                  "type": "string"
                },
                "organization_uuid": {
                  "type": "string"
                },
                "permissions": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "priority": {
                  "type": "integer"
                }
              },
              "required": [
                "organization_uuid",
                "name",
                "display_name",
                "permissions",
                "effective_permissions",
                "priority",
                "custom",
                "change_token"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "roles",
          "permissions"
        ],
        "type": "object"
      },
      "ManagementRoleOperation": {
        "additionalProperties": false,
        "properties": {
          "idempotency_key": {
            "type": "string"
          },
          "resource_exists": {
            "type": "boolean"
          },
          "resource_id": {
            "type": "string"
          },
          "result_change_token": {
            "pattern": "^(orv1_|omrv1_)[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "result_matches_current_state": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "idempotency_key",
          "resource_id",
          "resource_exists",
          "result_change_token",
          "result_matches_current_state"
        ],
        "type": "object"
      },
      "MessagesMessage": {
        "properties": {
          "content": {
            "description": "Any value"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "type": "object"
      },
      "MessagesRequest": {
        "properties": {
          "cache_control": {
            "description": "Opt in to top-level automatic prompt caching: {\"type\":\"ephemeral\"} (optionally \"ttl\":\"1h\"). Places one moving breakpoint on the largest cacheable prefix. Explicit per-block cache_control on system/message/tool content takes precedence. Caching is off unless set. Cache writes cost 1.25x input and reads 0.1x",
            "type": "object"
          },
          "max_tokens": {
            "type": "integer"
          },
          "messages": {
            "items": {
              "properties": {
                "content": {
                  "description": "Any value"
                },
                "role": {
                  "type": "string"
                }
              },
              "required": [
                "role",
                "content"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "metadata": {
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "models": {
            "description": "Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in model and the rest here; or omit model and the first entry is the primary. Each entry is any model string: a bare pooled name; a provider/model id; an org alias. Not allowed together with a dynamic/\u003cname\u003e route. At most 10 entries. Which model answered is in the X-Opper-Served-Model header; the model field still echoes what you sent.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "output_config": {
            "description": "Output configuration. A format of {\"type\":\"json_schema\" + \"schema\":{...}} constrains the response to that JSON Schema. An effort of low|medium|high sets adaptive-thinking effort. Sending a format here and a top-level output_format is a 400.",
            "type": "object"
          },
          "output_format": {
            "description": "Structured output; superseded by output_config.format. Accepts either the Messages API shape ({\"type\":\"json_schema\" + \"schema\":{...}}) or the OpenAI-style envelope ({\"type\":\"json_schema\" + \"json_schema\":{\"name\":... + \"schema\":{...}}}).",
            "type": "object"
          },
          "service_tier": {
            "description": "Processing tier. Anthropic values auto and standard_only run at the default tier; the OpenAI names flex; priority (alias fast) and ultrafast and Opper's economy pick that tier where the model has an endpoint for it. The tier that ran is in the X-Opper-Served-Service-Tier header.",
            "type": "string"
          },
          "speed": {
            "description": "fast asks for Anthropic fast mode (the priority tier; premium price) where the model has an endpoint for it; standard or empty is the default tier.",
            "type": "string"
          },
          "stop_sequences": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "stream": {
            "type": "boolean"
          },
          "system": {
            "description": "Any value"
          },
          "temperature": {
            "type": "number"
          },
          "thinking": {
            "description": "Any value"
          },
          "tool_choice": {
            "description": "Any value"
          },
          "tools": {
            "items": {
              "properties": {
                "cache_control": {
                  "type": "object"
                },
                "description": {
                  "type": "string"
                },
                "input_schema": {
                  "type": "object"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "top_k": {
            "type": "integer"
          },
          "top_p": {
            "type": "number"
          }
        },
        "required": [
          "model",
          "messages",
          "max_tokens"
        ],
        "type": "object"
      },
      "MessagesResponse": {
        "properties": {
          "content": {
            "items": {
              "description": "Any value"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "stop_reason": {
            "type": "string"
          },
          "stop_sequence": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "cache_creation_input_tokens": {
                "type": "integer"
              },
              "cache_read_input_tokens": {
                "type": "integer"
              },
              "input_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              },
              "server_tool_use": {
                "type": "object"
              }
            },
            "required": [
              "input_tokens",
              "output_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "type",
          "role",
          "content",
          "model",
          "stop_reason",
          "stop_sequence",
          "usage"
        ],
        "type": "object"
      },
      "MessagesResponseBlock": {
        "properties": {
          "id": {
            "type": "string"
          },
          "input": {
            "description": "Any value"
          },
          "name": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "MessagesTool": {
        "properties": {
          "cache_control": {
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "input_schema": {
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "MessagesUsage": {
        "properties": {
          "cache_creation_input_tokens": {
            "type": "integer"
          },
          "cache_read_input_tokens": {
            "type": "integer"
          },
          "input_tokens": {
            "type": "integer"
          },
          "output_tokens": {
            "type": "integer"
          },
          "server_tool_use": {
            "type": "object"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "type": "object"
      },
      "ModelChoicesResponse": {
        "properties": {
          "endpoints": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "list": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "model",
          "endpoints",
          "list"
        ],
        "type": "object"
      },
      "ModelInfo": {
        "properties": {
          "access": {
            "type": "string"
          },
          "access_group": {
            "type": "string"
          },
          "alias_only": {
            "type": "boolean"
          },
          "aliases": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "api_type": {
            "type": "string"
          },
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "context_window": {
            "type": "integer"
          },
          "cost": {
            "type": "number"
          },
          "country": {
            "deprecated": true,
            "description": "Deprecated: read compliance.inference_location on /v3/models. The English name of that location when it is one country (SE reads Sweden); absent otherwise.",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "featured": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "list_pricing": {
            "description": "The undiscounted selected price while a percentage discount applies; for an explicit scheduled tariff this is that tariff before its campaign discount. pricing carries the effective price. Absent without a percentage adjustment.",
            "properties": {
              "audio_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input_per_minute": {
                "type": "number"
              },
              "audio_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_output_per_minute": {
                "type": "number"
              },
              "billing_unit": {
                "type": "string"
              },
              "cache_creation": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_12h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_1h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "diarization_per_minute": {
                "type": "number"
              },
              "free_reference_images": {
                "type": "integer"
              },
              "google_search_price_per_prompt": {
                "type": "number"
              },
              "google_search_price_per_query": {
                "type": "number"
              },
              "image_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_prices": {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "number"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              "input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "input_surcharge_multiplier": {
                "type": "number"
              },
              "input_surcharge_threshold_tokens": {
                "type": "integer"
              },
              "input_transcription_per_minute": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "openai_code_interpreter_price_per_session": {
                "type": "number"
              },
              "openai_file_search_price_per_call": {
                "type": "number"
              },
              "openai_web_search_price_per_call": {
                "type": "number"
              },
              "output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "output_surcharge_multiplier": {
                "type": "number"
              },
              "price_first_megapixel": {
                "type": "number"
              },
              "price_per_extra_reference_image": {
                "type": "number"
              },
              "price_per_generation": {
                "type": "number"
              },
              "price_per_m_bytes": {
                "type": "number"
              },
              "price_per_m_chars": {
                "type": "number"
              },
              "price_per_megapixel": {
                "type": "number"
              },
              "price_per_minute": {
                "type": "number"
              },
              "price_per_page": {
                "type": "number"
              },
              "price_per_second": {
                "type": "number"
              },
              "price_per_second_audio": {
                "type": "number"
              },
              "price_per_second_by_resolution": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "price_per_second_voice": {
                "type": "number"
              },
              "price_vector_style": {
                "type": "number"
              },
              "rates": {
                "items": {
                  "properties": {
                    "amount": {
                      "type": "number"
                    },
                    "dimensions": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "unit": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "unit",
                    "amount"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "reasoning": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "reported_cost_markup": {
                "type": "number"
              },
              "thresholds": {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "web_fetch_price_per_request": {
                "type": "number"
              },
              "web_search_price_per_request": {
                "type": "number"
              },
              "xai_x_search_price_per_call": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "long_description": {
            "type": "string"
          },
          "maker": {
            "type": "string"
          },
          "maker_country": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "model_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "next_price_change_at": {
            "description": "The next instant at which this quote or its active adjustment can change. Refetch prices at this boundary.",
            "format": "date-time",
            "type": "string"
          },
          "params": {
            "properties": {
              "caller_params": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "default_max_tokens": {
                "type": "integer"
              },
              "embedding": {
                "properties": {
                  "dimensions": {
                    "type": "integer"
                  },
                  "max_input_tokens": {
                    "type": "integer"
                  },
                  "supports_dimensions": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "dimensions"
                ],
                "type": "object"
              },
              "image": {
                "properties": {
                  "aspect_ratios": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "default": {
                    "type": "string"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "qualities": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "resolutions": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "size_constraints": {
                    "properties": {
                      "max_edge": {
                        "type": "integer"
                      },
                      "max_pixels": {
                        "type": "integer"
                      },
                      "max_ratio": {
                        "type": "integer"
                      },
                      "min_edge": {
                        "type": "integer"
                      },
                      "min_pixels": {
                        "type": "integer"
                      },
                      "multiple_of": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  "sizes": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "styles": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "image_edit": {
                "properties": {
                  "aspect_ratios": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "default": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "max_tokens": {
                "type": "boolean"
              },
              "realtime": {
                "properties": {
                  "default_voice": {
                    "type": "string"
                  },
                  "diarize": {
                    "type": "boolean"
                  },
                  "input_audio_format": {
                    "type": "string"
                  },
                  "input_audio_formats": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "input_sample_rate": {
                    "type": "integer"
                  },
                  "languages": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "output_audio_format": {
                    "type": "string"
                  },
                  "output_sample_rate": {
                    "type": "integer"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "reasoning": {
                    "properties": {
                      "default": {
                        "type": "string"
                      },
                      "history": {
                        "type": "string"
                      },
                      "max_budget": {
                        "type": "integer"
                      },
                      "mode": {
                        "type": "string"
                      },
                      "supported": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "wire": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "supported",
                      "default"
                    ],
                    "type": "object"
                  },
                  "sample_rate": {
                    "type": "integer"
                  },
                  "semantic_vad": {
                    "type": "boolean"
                  },
                  "supports_tools": {
                    "type": "boolean"
                  },
                  "supports_vad": {
                    "type": "boolean"
                  },
                  "voices": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "reasoning": {
                "properties": {
                  "default": {
                    "type": "string"
                  },
                  "history": {
                    "type": "string"
                  },
                  "max_budget": {
                    "type": "integer"
                  },
                  "mode": {
                    "type": "string"
                  },
                  "supported": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "wire": {
                    "type": "string"
                  }
                },
                "required": [
                  "supported",
                  "default"
                ],
                "type": "object"
              },
              "stt": {
                "properties": {
                  "default_language": {
                    "type": "string"
                  },
                  "diarize": {
                    "type": "boolean"
                  },
                  "formats": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "languages": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "stream": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              },
              "temperature": {
                "properties": {
                  "default": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  },
                  "min": {
                    "type": "number"
                  }
                },
                "required": [
                  "min",
                  "max",
                  "default"
                ],
                "type": "object"
              },
              "tts": {
                "properties": {
                  "default_voice": {
                    "type": "string"
                  },
                  "formats": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "max_length": {
                    "type": "integer"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "voices": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "video": {
                "properties": {
                  "aspect_ratios": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "durations": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "max_duration": {
                    "type": "integer"
                  },
                  "max_fps": {
                    "type": "integer"
                  },
                  "max_frames": {
                    "type": "integer"
                  },
                  "min_duration": {
                    "type": "integer"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "resolutions": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "speed_modes": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "supports_seed": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "pooled": {
            "type": "boolean"
          },
          "price_campaigns": {
            "description": "Running and upcoming price campaigns on this endpoint",
            "items": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "discount_percent": {
                  "type": "number"
                },
                "ends_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "set_by": {
                  "type": "string"
                },
                "starts_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "token_only": {
                  "type": "boolean"
                }
              },
              "required": [
                "starts_at",
                "ends_at",
                "discount_percent",
                "set_by",
                "active"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "pricing": {
            "properties": {
              "audio_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input_per_minute": {
                "type": "number"
              },
              "audio_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_output_per_minute": {
                "type": "number"
              },
              "billing_unit": {
                "type": "string"
              },
              "cache_creation": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_12h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_1h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "diarization_per_minute": {
                "type": "number"
              },
              "free_reference_images": {
                "type": "integer"
              },
              "google_search_price_per_prompt": {
                "type": "number"
              },
              "google_search_price_per_query": {
                "type": "number"
              },
              "image_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_prices": {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "number"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              "input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "input_surcharge_multiplier": {
                "type": "number"
              },
              "input_surcharge_threshold_tokens": {
                "type": "integer"
              },
              "input_transcription_per_minute": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "openai_code_interpreter_price_per_session": {
                "type": "number"
              },
              "openai_file_search_price_per_call": {
                "type": "number"
              },
              "openai_web_search_price_per_call": {
                "type": "number"
              },
              "output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "output_surcharge_multiplier": {
                "type": "number"
              },
              "price_first_megapixel": {
                "type": "number"
              },
              "price_per_extra_reference_image": {
                "type": "number"
              },
              "price_per_generation": {
                "type": "number"
              },
              "price_per_m_bytes": {
                "type": "number"
              },
              "price_per_m_chars": {
                "type": "number"
              },
              "price_per_megapixel": {
                "type": "number"
              },
              "price_per_minute": {
                "type": "number"
              },
              "price_per_page": {
                "type": "number"
              },
              "price_per_second": {
                "type": "number"
              },
              "price_per_second_audio": {
                "type": "number"
              },
              "price_per_second_by_resolution": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "price_per_second_voice": {
                "type": "number"
              },
              "price_vector_style": {
                "type": "number"
              },
              "rates": {
                "items": {
                  "properties": {
                    "amount": {
                      "type": "number"
                    },
                    "dimensions": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "unit": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "unit",
                    "amount"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "reasoning": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "reported_cost_markup": {
                "type": "number"
              },
              "thresholds": {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "web_fetch_price_per_request": {
                "type": "number"
              },
              "web_search_price_per_request": {
                "type": "number"
              },
              "xai_x_search_price_per_call": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "provider": {
            "type": "string"
          },
          "provider_display_name": {
            "type": "string"
          },
          "quality": {
            "type": "string"
          },
          "recurring_price_windows": {
            "description": "Daily local-clock windows in one IANA timezone",
            "items": {
              "oneOf": [
                {
                  "required": [
                    "discount_percent"
                  ]
                },
                {
                  "required": [
                    "pricing"
                  ]
                }
              ],
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "discount_percent": {
                  "exclusiveMinimum": 0,
                  "maximum": 100,
                  "multipleOf": 0.01,
                  "type": "number"
                },
                "end": {
                  "type": "string"
                },
                "pricing": {
                  "additionalProperties": false,
                  "properties": {
                    "audio_cached_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "audio_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "audio_input_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "audio_output": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "audio_output_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "cache_creation": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cache_creation_12h": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cache_creation_1h": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cached_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "diarization_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "google_search_price_per_prompt": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "google_search_price_per_query": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "image_cached_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "image_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "image_output": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "image_prices": {
                      "additionalProperties": {
                        "additionalProperties": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "minProperties": 1,
                        "type": "object"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "input_transcription_per_minute": {
                      "additionalProperties": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "openai_code_interpreter_price_per_session": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "openai_file_search_price_per_call": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "openai_web_search_price_per_call": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "output": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "price_first_megapixel": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_billable_unit": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_extra_reference_image": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_generation": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_m_bytes": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_m_chars": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_megapixel": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_page": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_second": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_second_audio": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_second_by_resolution": {
                      "additionalProperties": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "price_per_second_voice": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_vector_style": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "reasoning": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "reported_cost_markup": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "video_token_prices": {
                      "additionalProperties": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "web_fetch_price_per_request": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "web_search_price_per_request": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "xai_x_search_price_per_call": {
                      "minimum": 0,
                      "type": "number"
                    }
                  },
                  "type": "object"
                },
                "start": {
                  "type": "string"
                },
                "timezone": {
                  "type": "string"
                }
              },
              "required": [
                "start",
                "end",
                "timezone"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "region": {
            "type": "string"
          },
          "retired_at": {
            "format": "date-time",
            "type": "string"
          },
          "server_tools": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "short_description": {
            "type": "string"
          },
          "speed": {
            "type": "string"
          },
          "successor": {
            "type": "string"
          },
          "thinking": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "usage_notes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "type",
          "provider",
          "provider_display_name",
          "name",
          "model_id",
          "capabilities",
          "speed",
          "quality",
          "context_window",
          "description"
        ],
        "type": "object"
      },
      "ModelListItem": {
        "properties": {
          "access": {
            "type": "string"
          },
          "access_group": {
            "type": "string"
          },
          "alias_only": {
            "type": "boolean"
          },
          "aliases": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "api_type": {
            "type": "string"
          },
          "benchmarks": {
            "properties": {
              "aa_slug": {
                "type": "string"
              },
              "agentic_index": {
                "type": "number"
              },
              "as_of": {
                "type": "string"
              },
              "coding_index": {
                "type": "number"
              },
              "evaluations": {
                "properties": {
                  "aime": {
                    "type": "number"
                  },
                  "aime_25": {
                    "type": "number"
                  },
                  "automationbench_aa": {
                    "type": "number"
                  },
                  "frontiercode_v2_0": {
                    "type": "number"
                  },
                  "gpqa": {
                    "type": "number"
                  },
                  "hle": {
                    "type": "number"
                  },
                  "ifbench": {
                    "type": "number"
                  },
                  "lcr": {
                    "type": "number"
                  },
                  "livecodebench": {
                    "type": "number"
                  },
                  "math_500": {
                    "type": "number"
                  },
                  "mmlu_pro": {
                    "type": "number"
                  },
                  "scicode": {
                    "type": "number"
                  },
                  "tau2": {
                    "type": "number"
                  },
                  "terminalbench_hard": {
                    "type": "number"
                  },
                  "terminalbench_v4_0": {
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "finance_index": {
                "type": "number"
              },
              "healthcare_index": {
                "type": "number"
              },
              "intelligence_index": {
                "type": "number"
              },
              "legal_index": {
                "type": "number"
              },
              "math_index": {
                "type": "number"
              },
              "multilingual_index": {
                "type": "number"
              },
              "scores": {
                "properties": {
                  "agents": {
                    "type": "number"
                  },
                  "agents_previous": {
                    "type": "boolean"
                  },
                  "coding": {
                    "type": "number"
                  },
                  "coding_previous": {
                    "type": "boolean"
                  },
                  "finance": {
                    "type": "number"
                  },
                  "healthcare": {
                    "type": "number"
                  },
                  "intelligence": {
                    "type": "number"
                  },
                  "legal": {
                    "type": "number"
                  },
                  "multilingual": {
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "source": {
                "type": "string"
              }
            },
            "required": [
              "source",
              "as_of"
            ],
            "type": "object"
          },
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "compliance": {
            "properties": {
              "cache_scope": {
                "type": "string"
              },
              "cache_ttl_seconds": {
                "type": "integer"
              },
              "caching": {
                "type": "string"
              },
              "content_storage": {
                "type": "string"
              },
              "country": {
                "deprecated": true,
                "description": "Deprecated: read inference_location. The English name of inference_location when that is one country (SE reads Sweden); absent otherwise.",
                "type": "string"
              },
              "dpa_available": {
                "type": "boolean"
              },
              "inference_location": {
                "type": "string"
              },
              "logging": {
                "type": "string"
              },
              "moderation": {
                "type": "string"
              },
              "residency": {
                "type": "string"
              },
              "retention_days": {
                "type": "integer"
              },
              "route_id": {
                "type": "string"
              },
              "storage_location": {
                "type": "string"
              },
              "third_party_access": {
                "type": "boolean"
              },
              "training": {
                "type": "string"
              },
              "transfer_mechanism": {
                "type": "string"
              },
              "zdr": {
                "properties": {
                  "caching": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "logging": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "moderation": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subprocessors": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "training": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "logging",
                  "moderation",
                  "caching",
                  "training",
                  "subprocessors"
                ],
                "type": "object"
              }
            },
            "required": [
              "dpa_available",
              "third_party_access"
            ],
            "type": "object"
          },
          "context_window": {
            "type": "integer"
          },
          "cost": {
            "type": "number"
          },
          "country": {
            "deprecated": true,
            "description": "Deprecated: read compliance.inference_location on /v3/models. The English name of that location when it is one country (SE reads Sweden); absent otherwise.",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "featured": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "input_modalities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "list_pricing": {
            "description": "The undiscounted selected price while a percentage discount applies; for an explicit scheduled tariff this is that tariff before its campaign discount. pricing carries the effective price. Absent without a percentage adjustment.",
            "properties": {
              "audio_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input_per_minute": {
                "type": "number"
              },
              "audio_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_output_per_minute": {
                "type": "number"
              },
              "billing_unit": {
                "type": "string"
              },
              "cache_creation": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_12h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_1h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "diarization_per_minute": {
                "type": "number"
              },
              "free_reference_images": {
                "type": "integer"
              },
              "google_search_price_per_prompt": {
                "type": "number"
              },
              "google_search_price_per_query": {
                "type": "number"
              },
              "image_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_prices": {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "number"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              "input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "input_surcharge_multiplier": {
                "type": "number"
              },
              "input_surcharge_threshold_tokens": {
                "type": "integer"
              },
              "input_transcription_per_minute": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "openai_code_interpreter_price_per_session": {
                "type": "number"
              },
              "openai_file_search_price_per_call": {
                "type": "number"
              },
              "openai_web_search_price_per_call": {
                "type": "number"
              },
              "output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "output_surcharge_multiplier": {
                "type": "number"
              },
              "price_first_megapixel": {
                "type": "number"
              },
              "price_per_extra_reference_image": {
                "type": "number"
              },
              "price_per_generation": {
                "type": "number"
              },
              "price_per_m_bytes": {
                "type": "number"
              },
              "price_per_m_chars": {
                "type": "number"
              },
              "price_per_megapixel": {
                "type": "number"
              },
              "price_per_minute": {
                "type": "number"
              },
              "price_per_page": {
                "type": "number"
              },
              "price_per_second": {
                "type": "number"
              },
              "price_per_second_audio": {
                "type": "number"
              },
              "price_per_second_by_resolution": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "price_per_second_voice": {
                "type": "number"
              },
              "price_vector_style": {
                "type": "number"
              },
              "rates": {
                "items": {
                  "properties": {
                    "amount": {
                      "type": "number"
                    },
                    "dimensions": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "unit": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "unit",
                    "amount"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "reasoning": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "reported_cost_markup": {
                "type": "number"
              },
              "thresholds": {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "web_fetch_price_per_request": {
                "type": "number"
              },
              "web_search_price_per_request": {
                "type": "number"
              },
              "xai_x_search_price_per_call": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "long_description": {
            "type": "string"
          },
          "maker": {
            "properties": {
              "country": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "slug"
            ],
            "type": "object"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "model_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "next_price_change_at": {
            "description": "The next instant at which this quote or its active adjustment can change. Refetch prices at this boundary.",
            "format": "date-time",
            "type": "string"
          },
          "output_modalities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "params": {
            "properties": {
              "caller_params": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "default_max_tokens": {
                "type": "integer"
              },
              "embedding": {
                "properties": {
                  "dimensions": {
                    "type": "integer"
                  },
                  "max_input_tokens": {
                    "type": "integer"
                  },
                  "supports_dimensions": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "dimensions"
                ],
                "type": "object"
              },
              "image": {
                "properties": {
                  "aspect_ratios": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "default": {
                    "type": "string"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "qualities": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "resolutions": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "size_constraints": {
                    "properties": {
                      "max_edge": {
                        "type": "integer"
                      },
                      "max_pixels": {
                        "type": "integer"
                      },
                      "max_ratio": {
                        "type": "integer"
                      },
                      "min_edge": {
                        "type": "integer"
                      },
                      "min_pixels": {
                        "type": "integer"
                      },
                      "multiple_of": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  "sizes": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "styles": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "image_edit": {
                "properties": {
                  "aspect_ratios": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "default": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "max_tokens": {
                "type": "boolean"
              },
              "realtime": {
                "properties": {
                  "default_voice": {
                    "type": "string"
                  },
                  "diarize": {
                    "type": "boolean"
                  },
                  "input_audio_format": {
                    "type": "string"
                  },
                  "input_audio_formats": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "input_sample_rate": {
                    "type": "integer"
                  },
                  "languages": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "output_audio_format": {
                    "type": "string"
                  },
                  "output_sample_rate": {
                    "type": "integer"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "reasoning": {
                    "properties": {
                      "default": {
                        "type": "string"
                      },
                      "history": {
                        "type": "string"
                      },
                      "max_budget": {
                        "type": "integer"
                      },
                      "mode": {
                        "type": "string"
                      },
                      "supported": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "wire": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "supported",
                      "default"
                    ],
                    "type": "object"
                  },
                  "sample_rate": {
                    "type": "integer"
                  },
                  "semantic_vad": {
                    "type": "boolean"
                  },
                  "supports_tools": {
                    "type": "boolean"
                  },
                  "supports_vad": {
                    "type": "boolean"
                  },
                  "voices": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "reasoning": {
                "properties": {
                  "default": {
                    "type": "string"
                  },
                  "history": {
                    "type": "string"
                  },
                  "max_budget": {
                    "type": "integer"
                  },
                  "mode": {
                    "type": "string"
                  },
                  "supported": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "wire": {
                    "type": "string"
                  }
                },
                "required": [
                  "supported",
                  "default"
                ],
                "type": "object"
              },
              "stt": {
                "properties": {
                  "default_language": {
                    "type": "string"
                  },
                  "diarize": {
                    "type": "boolean"
                  },
                  "formats": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "languages": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "stream": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              },
              "temperature": {
                "properties": {
                  "default": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  },
                  "min": {
                    "type": "number"
                  }
                },
                "required": [
                  "min",
                  "max",
                  "default"
                ],
                "type": "object"
              },
              "tts": {
                "properties": {
                  "default_voice": {
                    "type": "string"
                  },
                  "formats": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "max_length": {
                    "type": "integer"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "voices": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "video": {
                "properties": {
                  "aspect_ratios": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "durations": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "max_duration": {
                    "type": "integer"
                  },
                  "max_fps": {
                    "type": "integer"
                  },
                  "max_frames": {
                    "type": "integer"
                  },
                  "min_duration": {
                    "type": "integer"
                  },
                  "parameters": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "enum": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "example": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "resolutions": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "speed_modes": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "supports_seed": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "performance": {
            "properties": {
              "tokens_per_second": {
                "description": "Output tokens per second of call duration over the last day of Opper traffic",
                "type": "integer"
              },
              "ttft_ms": {
                "description": "Median time to first token in milliseconds over the last day of Opper traffic",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "policy": {
            "properties": {
              "allowed": {
                "type": "boolean"
              },
              "blocked_by": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "allowed"
            ],
            "type": "object"
          },
          "pooled": {
            "type": "boolean"
          },
          "price_campaigns": {
            "description": "Running and upcoming price campaigns on this endpoint",
            "items": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "discount_percent": {
                  "type": "number"
                },
                "ends_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "set_by": {
                  "type": "string"
                },
                "starts_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "token_only": {
                  "type": "boolean"
                }
              },
              "required": [
                "starts_at",
                "ends_at",
                "discount_percent",
                "set_by",
                "active"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "pricing": {
            "properties": {
              "audio_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_input_per_minute": {
                "type": "number"
              },
              "audio_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "audio_output_per_minute": {
                "type": "number"
              },
              "billing_unit": {
                "type": "string"
              },
              "cache_creation": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_12h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cache_creation_1h": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "diarization_per_minute": {
                "type": "number"
              },
              "free_reference_images": {
                "type": "integer"
              },
              "google_search_price_per_prompt": {
                "type": "number"
              },
              "google_search_price_per_query": {
                "type": "number"
              },
              "image_cached_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "image_prices": {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "number"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              "input": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "input_surcharge_multiplier": {
                "type": "number"
              },
              "input_surcharge_threshold_tokens": {
                "type": "integer"
              },
              "input_transcription_per_minute": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "openai_code_interpreter_price_per_session": {
                "type": "number"
              },
              "openai_file_search_price_per_call": {
                "type": "number"
              },
              "openai_web_search_price_per_call": {
                "type": "number"
              },
              "output": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "output_surcharge_multiplier": {
                "type": "number"
              },
              "price_first_megapixel": {
                "type": "number"
              },
              "price_per_extra_reference_image": {
                "type": "number"
              },
              "price_per_generation": {
                "type": "number"
              },
              "price_per_m_bytes": {
                "type": "number"
              },
              "price_per_m_chars": {
                "type": "number"
              },
              "price_per_megapixel": {
                "type": "number"
              },
              "price_per_minute": {
                "type": "number"
              },
              "price_per_page": {
                "type": "number"
              },
              "price_per_second": {
                "type": "number"
              },
              "price_per_second_audio": {
                "type": "number"
              },
              "price_per_second_by_resolution": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "price_per_second_voice": {
                "type": "number"
              },
              "price_vector_style": {
                "type": "number"
              },
              "rates": {
                "items": {
                  "properties": {
                    "amount": {
                      "type": "number"
                    },
                    "dimensions": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "unit": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "unit",
                    "amount"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "reasoning": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "reported_cost_markup": {
                "type": "number"
              },
              "thresholds": {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "web_fetch_price_per_request": {
                "type": "number"
              },
              "web_search_price_per_request": {
                "type": "number"
              },
              "xai_x_search_price_per_call": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "provider": {
            "properties": {
              "display_name": {
                "type": "string"
              },
              "owner_country": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "slug",
              "display_name"
            ],
            "type": "object"
          },
          "quality": {
            "type": "string"
          },
          "quantization": {
            "type": "string"
          },
          "recurring_price_windows": {
            "description": "Daily local-clock windows in one IANA timezone",
            "items": {
              "oneOf": [
                {
                  "required": [
                    "discount_percent"
                  ]
                },
                {
                  "required": [
                    "pricing"
                  ]
                }
              ],
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "discount_percent": {
                  "exclusiveMinimum": 0,
                  "maximum": 100,
                  "multipleOf": 0.01,
                  "type": "number"
                },
                "end": {
                  "type": "string"
                },
                "pricing": {
                  "additionalProperties": false,
                  "properties": {
                    "audio_cached_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "audio_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "audio_input_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "audio_output": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "audio_output_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "cache_creation": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cache_creation_12h": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cache_creation_1h": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cached_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "diarization_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "google_search_price_per_prompt": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "google_search_price_per_query": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "image_cached_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "image_input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "image_output": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "image_prices": {
                      "additionalProperties": {
                        "additionalProperties": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "minProperties": 1,
                        "type": "object"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "input": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "input_transcription_per_minute": {
                      "additionalProperties": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "openai_code_interpreter_price_per_session": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "openai_file_search_price_per_call": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "openai_web_search_price_per_call": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "output": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "price_first_megapixel": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_billable_unit": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_extra_reference_image": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_generation": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_m_bytes": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_m_chars": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_megapixel": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_minute": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_page": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_second": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_second_audio": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_per_second_by_resolution": {
                      "additionalProperties": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "price_per_second_voice": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "price_vector_style": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "reasoning": {
                      "items": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "reported_cost_markup": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "video_token_prices": {
                      "additionalProperties": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "minProperties": 1,
                      "type": "object"
                    },
                    "web_fetch_price_per_request": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "web_search_price_per_request": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "xai_x_search_price_per_call": {
                      "minimum": 0,
                      "type": "number"
                    }
                  },
                  "type": "object"
                },
                "start": {
                  "type": "string"
                },
                "timezone": {
                  "type": "string"
                }
              },
              "required": [
                "start",
                "end",
                "timezone"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "references": {
            "items": {
              "properties": {
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "updated_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "region": {
            "type": "string"
          },
          "release": {
            "properties": {
              "date": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "date",
              "source"
            ],
            "type": "object"
          },
          "retired_at": {
            "format": "date-time",
            "type": "string"
          },
          "route": {
            "properties": {
              "access": {
                "type": "string"
              },
              "country": {
                "deprecated": true,
                "description": "Deprecated: read inference_location. The English name of inference_location when that is one country (SE reads Sweden); absent otherwise.",
                "type": "string"
              },
              "data_handling": {
                "properties": {
                  "caching": {
                    "properties": {
                      "default": {
                        "type": "string"
                      },
                      "scope": {
                        "type": "string"
                      },
                      "storage_location": {
                        "type": "string"
                      },
                      "ttl_seconds": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "default"
                    ],
                    "type": "object"
                  },
                  "logging": {
                    "properties": {
                      "default": {
                        "type": "string"
                      },
                      "human_review": {
                        "type": "string"
                      },
                      "retention_days": {
                        "type": "integer"
                      },
                      "storage_location": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "default",
                      "retention_days"
                    ],
                    "type": "object"
                  },
                  "moderation": {
                    "properties": {
                      "default": {
                        "type": "string"
                      },
                      "human_review": {
                        "type": "string"
                      },
                      "retention_days": {
                        "type": "integer"
                      },
                      "storage_location": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "default",
                      "retention_days"
                    ],
                    "type": "object"
                  },
                  "residency_enforced": {
                    "type": "boolean"
                  },
                  "subprocessors_read_content": {
                    "type": "boolean"
                  },
                  "training": {
                    "properties": {
                      "default": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "default"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "training",
                  "logging",
                  "moderation",
                  "caching"
                ],
                "type": "object"
              },
              "gdpr": {
                "properties": {
                  "dpa_available": {
                    "type": "boolean"
                  },
                  "residency": {
                    "type": "string"
                  },
                  "transfer_mechanism": {
                    "type": "string"
                  }
                },
                "required": [
                  "residency",
                  "transfer_mechanism"
                ],
                "type": "object"
              },
              "id": {
                "type": "string"
              },
              "inference_location": {
                "type": "string"
              },
              "last_verified_at": {
                "type": "string"
              },
              "native_region": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "provider_display_name": {
                "type": "string"
              },
              "region": {
                "description": "The residency bucket of inference_location: EU for an EU member state or the EU area",
                "type": "string"
              },
              "sources": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "underlying_maker": {
                "type": "string"
              },
              "verification": {
                "properties": {
                  "attested_at": {
                    "type": "string"
                  },
                  "opper_verified_at": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "verified_by": {
                    "type": "string"
                  }
                },
                "required": [
                  "status"
                ],
                "type": "object"
              },
              "zdr": {
                "properties": {
                  "caching": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "logging": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "moderation": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subprocessors": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "training": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "logging",
                  "moderation",
                  "caching",
                  "training",
                  "subprocessors"
                ],
                "type": "object"
              }
            },
            "required": [
              "id",
              "provider",
              "provider_display_name",
              "native_region",
              "data_handling",
              "gdpr",
              "region"
            ],
            "type": "object"
          },
          "server_tools": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "service_route": {
            "properties": {
              "adapter": {
                "type": "string"
              },
              "id": {
                "description": "The service route's id: what model access rules and locks match on. It never changes; a rename changes name only.",
                "type": "string"
              },
              "name": {
                "description": "What to show a person for this service route. It can change; use id to tell routes apart. Absent while a route has no name.",
                "type": "string"
              },
              "uuid": {
                "description": "A second identifier for the service route that never changes. An opaque value: compare it and do not parse it.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "adapter"
            ],
            "type": "object"
          },
          "service_tier": {
            "description": "Processing tier of this endpoint when it is not the provider default: flex (discounted and slower; may be out of capacity) or priority / ultrafast (faster at a premium) or economy (the same model sold cheaper and slower under its own model id) or batch (POST /v3/batches only) or background_2h / background_8h (a discounted background run that completes within the window: send background true with background_options.completion_window on the Responses API). Absent on default-tier endpoints. Reach flex / priority / ultrafast / economy with the service_tier request field or by this endpoint's id.",
            "enum": [
              "flex",
              "priority",
              "ultrafast",
              "economy",
              "batch",
              "background_2h",
              "background_8h"
            ],
            "type": "string"
          },
          "short_description": {
            "type": "string"
          },
          "speed": {
            "type": "string"
          },
          "successor": {
            "type": "string"
          },
          "thinking": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "usage_notes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "type",
          "provider",
          "name",
          "model_id",
          "capabilities",
          "speed",
          "quality",
          "context_window",
          "description",
          "service_route"
        ],
        "type": "object"
      },
      "ModelNotFoundResponse": {
        "properties": {
          "error": {
            "type": "string"
          },
          "search": {
            "type": "string"
          },
          "suggestions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "unavailable": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "suggestions",
          "search",
          "unavailable"
        ],
        "type": "object"
      },
      "ModelResolveRequest": {
        "properties": {
          "messages": {
            "items": {
              "properties": {
                "cache_control": {
                  "type": "object"
                },
                "content": {
                  "description": "Any value"
                },
                "name": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "tool_call_id": {
                  "type": "string"
                },
                "tool_calls": {
                  "items": {
                    "properties": {
                      "arguments": {
                        "type": "object"
                      },
                      "freeform": {
                        "type": "boolean"
                      },
                      "id": {
                        "type": "string"
                      },
                      "input": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "namespace": {
                        "type": "string"
                      },
                      "thought_signature": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "arguments"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "role",
                "content"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "overrides": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "messages"
        ],
        "type": "object"
      },
      "ModelResolveResponse": {
        "properties": {
          "category": {
            "type": "string"
          },
          "model": {
            "properties": {
              "access": {
                "type": "string"
              },
              "access_group": {
                "type": "string"
              },
              "alias_only": {
                "type": "boolean"
              },
              "aliases": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "api_type": {
                "type": "string"
              },
              "benchmarks": {
                "properties": {
                  "aa_slug": {
                    "type": "string"
                  },
                  "agentic_index": {
                    "type": "number"
                  },
                  "as_of": {
                    "type": "string"
                  },
                  "coding_index": {
                    "type": "number"
                  },
                  "evaluations": {
                    "properties": {
                      "aime": {
                        "type": "number"
                      },
                      "aime_25": {
                        "type": "number"
                      },
                      "automationbench_aa": {
                        "type": "number"
                      },
                      "frontiercode_v2_0": {
                        "type": "number"
                      },
                      "gpqa": {
                        "type": "number"
                      },
                      "hle": {
                        "type": "number"
                      },
                      "ifbench": {
                        "type": "number"
                      },
                      "lcr": {
                        "type": "number"
                      },
                      "livecodebench": {
                        "type": "number"
                      },
                      "math_500": {
                        "type": "number"
                      },
                      "mmlu_pro": {
                        "type": "number"
                      },
                      "scicode": {
                        "type": "number"
                      },
                      "tau2": {
                        "type": "number"
                      },
                      "terminalbench_hard": {
                        "type": "number"
                      },
                      "terminalbench_v4_0": {
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "finance_index": {
                    "type": "number"
                  },
                  "healthcare_index": {
                    "type": "number"
                  },
                  "intelligence_index": {
                    "type": "number"
                  },
                  "legal_index": {
                    "type": "number"
                  },
                  "math_index": {
                    "type": "number"
                  },
                  "multilingual_index": {
                    "type": "number"
                  },
                  "scores": {
                    "properties": {
                      "agents": {
                        "type": "number"
                      },
                      "agents_previous": {
                        "type": "boolean"
                      },
                      "coding": {
                        "type": "number"
                      },
                      "coding_previous": {
                        "type": "boolean"
                      },
                      "finance": {
                        "type": "number"
                      },
                      "healthcare": {
                        "type": "number"
                      },
                      "intelligence": {
                        "type": "number"
                      },
                      "legal": {
                        "type": "number"
                      },
                      "multilingual": {
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "source": {
                    "type": "string"
                  }
                },
                "required": [
                  "source",
                  "as_of"
                ],
                "type": "object"
              },
              "capabilities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "compliance": {
                "properties": {
                  "cache_scope": {
                    "type": "string"
                  },
                  "cache_ttl_seconds": {
                    "type": "integer"
                  },
                  "caching": {
                    "type": "string"
                  },
                  "content_storage": {
                    "type": "string"
                  },
                  "country": {
                    "deprecated": true,
                    "description": "Deprecated: read inference_location. The English name of inference_location when that is one country (SE reads Sweden); absent otherwise.",
                    "type": "string"
                  },
                  "dpa_available": {
                    "type": "boolean"
                  },
                  "inference_location": {
                    "type": "string"
                  },
                  "logging": {
                    "type": "string"
                  },
                  "moderation": {
                    "type": "string"
                  },
                  "residency": {
                    "type": "string"
                  },
                  "retention_days": {
                    "type": "integer"
                  },
                  "route_id": {
                    "type": "string"
                  },
                  "storage_location": {
                    "type": "string"
                  },
                  "third_party_access": {
                    "type": "boolean"
                  },
                  "training": {
                    "type": "string"
                  },
                  "transfer_mechanism": {
                    "type": "string"
                  },
                  "zdr": {
                    "properties": {
                      "caching": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "logging": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "moderation": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "subprocessors": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "training": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "logging",
                      "moderation",
                      "caching",
                      "training",
                      "subprocessors"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "dpa_available",
                  "third_party_access"
                ],
                "type": "object"
              },
              "context_window": {
                "type": "integer"
              },
              "cost": {
                "type": "number"
              },
              "country": {
                "deprecated": true,
                "description": "Deprecated: read compliance.inference_location on /v3/models. The English name of that location when it is one country (SE reads Sweden); absent otherwise.",
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "family": {
                "type": "string"
              },
              "featured": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              },
              "input_modalities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "list_pricing": {
                "description": "The undiscounted selected price while a percentage discount applies; for an explicit scheduled tariff this is that tariff before its campaign discount. pricing carries the effective price. Absent without a percentage adjustment.",
                "properties": {
                  "audio_cached_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "audio_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "audio_input_per_minute": {
                    "type": "number"
                  },
                  "audio_output": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "audio_output_per_minute": {
                    "type": "number"
                  },
                  "billing_unit": {
                    "type": "string"
                  },
                  "cache_creation": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "cache_creation_12h": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "cache_creation_1h": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "cached_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "diarization_per_minute": {
                    "type": "number"
                  },
                  "free_reference_images": {
                    "type": "integer"
                  },
                  "google_search_price_per_prompt": {
                    "type": "number"
                  },
                  "google_search_price_per_query": {
                    "type": "number"
                  },
                  "image_cached_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "image_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "image_output": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "image_prices": {
                    "additionalProperties": {
                      "additionalProperties": {
                        "type": "number"
                      },
                      "type": "object"
                    },
                    "type": "object"
                  },
                  "input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "input_surcharge_multiplier": {
                    "type": "number"
                  },
                  "input_surcharge_threshold_tokens": {
                    "type": "integer"
                  },
                  "input_transcription_per_minute": {
                    "additionalProperties": {
                      "type": "number"
                    },
                    "type": "object"
                  },
                  "openai_code_interpreter_price_per_session": {
                    "type": "number"
                  },
                  "openai_file_search_price_per_call": {
                    "type": "number"
                  },
                  "openai_web_search_price_per_call": {
                    "type": "number"
                  },
                  "output": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "output_surcharge_multiplier": {
                    "type": "number"
                  },
                  "price_first_megapixel": {
                    "type": "number"
                  },
                  "price_per_extra_reference_image": {
                    "type": "number"
                  },
                  "price_per_generation": {
                    "type": "number"
                  },
                  "price_per_m_bytes": {
                    "type": "number"
                  },
                  "price_per_m_chars": {
                    "type": "number"
                  },
                  "price_per_megapixel": {
                    "type": "number"
                  },
                  "price_per_minute": {
                    "type": "number"
                  },
                  "price_per_page": {
                    "type": "number"
                  },
                  "price_per_second": {
                    "type": "number"
                  },
                  "price_per_second_audio": {
                    "type": "number"
                  },
                  "price_per_second_by_resolution": {
                    "additionalProperties": {
                      "type": "number"
                    },
                    "type": "object"
                  },
                  "price_per_second_voice": {
                    "type": "number"
                  },
                  "price_vector_style": {
                    "type": "number"
                  },
                  "rates": {
                    "items": {
                      "properties": {
                        "amount": {
                          "type": "number"
                        },
                        "dimensions": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "unit",
                        "amount"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "reasoning": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "reported_cost_markup": {
                    "type": "number"
                  },
                  "thresholds": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "web_fetch_price_per_request": {
                    "type": "number"
                  },
                  "web_search_price_per_request": {
                    "type": "number"
                  },
                  "xai_x_search_price_per_call": {
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "long_description": {
                "type": "string"
              },
              "maker": {
                "properties": {
                  "country": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  }
                },
                "required": [
                  "slug"
                ],
                "type": "object"
              },
              "maker_country": {
                "type": "string"
              },
              "max_output_tokens": {
                "type": "integer"
              },
              "model": {
                "type": "string"
              },
              "model_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "next_price_change_at": {
                "description": "The next instant at which this quote or its active adjustment can change. Refetch prices at this boundary.",
                "format": "date-time",
                "type": "string"
              },
              "output_modalities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "params": {
                "properties": {
                  "caller_params": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "default_max_tokens": {
                    "type": "integer"
                  },
                  "embedding": {
                    "properties": {
                      "dimensions": {
                        "type": "integer"
                      },
                      "max_input_tokens": {
                        "type": "integer"
                      },
                      "supports_dimensions": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "dimensions"
                    ],
                    "type": "object"
                  },
                  "image": {
                    "properties": {
                      "aspect_ratios": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "default": {
                        "type": "string"
                      },
                      "parameters": {
                        "items": {
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "enum": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "example": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "qualities": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "resolutions": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "size_constraints": {
                        "properties": {
                          "max_edge": {
                            "type": "integer"
                          },
                          "max_pixels": {
                            "type": "integer"
                          },
                          "max_ratio": {
                            "type": "integer"
                          },
                          "min_edge": {
                            "type": "integer"
                          },
                          "min_pixels": {
                            "type": "integer"
                          },
                          "multiple_of": {
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "sizes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "styles": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "image_edit": {
                    "properties": {
                      "aspect_ratios": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "default": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "max_tokens": {
                    "type": "boolean"
                  },
                  "realtime": {
                    "properties": {
                      "default_voice": {
                        "type": "string"
                      },
                      "diarize": {
                        "type": "boolean"
                      },
                      "input_audio_format": {
                        "type": "string"
                      },
                      "input_audio_formats": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "input_sample_rate": {
                        "type": "integer"
                      },
                      "languages": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "output_audio_format": {
                        "type": "string"
                      },
                      "output_sample_rate": {
                        "type": "integer"
                      },
                      "parameters": {
                        "items": {
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "enum": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "example": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "reasoning": {
                        "properties": {
                          "default": {
                            "type": "string"
                          },
                          "history": {
                            "type": "string"
                          },
                          "max_budget": {
                            "type": "integer"
                          },
                          "mode": {
                            "type": "string"
                          },
                          "supported": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "wire": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "supported",
                          "default"
                        ],
                        "type": "object"
                      },
                      "sample_rate": {
                        "type": "integer"
                      },
                      "semantic_vad": {
                        "type": "boolean"
                      },
                      "supports_tools": {
                        "type": "boolean"
                      },
                      "supports_vad": {
                        "type": "boolean"
                      },
                      "voices": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "reasoning": {
                    "properties": {
                      "default": {
                        "type": "string"
                      },
                      "history": {
                        "type": "string"
                      },
                      "max_budget": {
                        "type": "integer"
                      },
                      "mode": {
                        "type": "string"
                      },
                      "supported": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "wire": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "supported",
                      "default"
                    ],
                    "type": "object"
                  },
                  "stt": {
                    "properties": {
                      "default_language": {
                        "type": "string"
                      },
                      "diarize": {
                        "type": "boolean"
                      },
                      "formats": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "languages": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "parameters": {
                        "items": {
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "enum": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "example": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "stream": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "temperature": {
                    "properties": {
                      "default": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      },
                      "min": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "min",
                      "max",
                      "default"
                    ],
                    "type": "object"
                  },
                  "tts": {
                    "properties": {
                      "default_voice": {
                        "type": "string"
                      },
                      "formats": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "max_length": {
                        "type": "integer"
                      },
                      "parameters": {
                        "items": {
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "enum": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "example": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "voices": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "video": {
                    "properties": {
                      "aspect_ratios": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "durations": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "max_duration": {
                        "type": "integer"
                      },
                      "max_fps": {
                        "type": "integer"
                      },
                      "max_frames": {
                        "type": "integer"
                      },
                      "min_duration": {
                        "type": "integer"
                      },
                      "parameters": {
                        "items": {
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "enum": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "example": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "resolutions": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "speed_modes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "supports_seed": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "performance": {
                "properties": {
                  "tokens_per_second": {
                    "description": "Output tokens per second of call duration over the last day of Opper traffic",
                    "type": "integer"
                  },
                  "ttft_ms": {
                    "description": "Median time to first token in milliseconds over the last day of Opper traffic",
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "policy": {
                "properties": {
                  "allowed": {
                    "type": "boolean"
                  },
                  "blocked_by": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "allowed"
                ],
                "type": "object"
              },
              "pooled": {
                "type": "boolean"
              },
              "price_campaigns": {
                "description": "Running and upcoming price campaigns on this endpoint",
                "items": {
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "discount_percent": {
                      "type": "number"
                    },
                    "ends_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "set_by": {
                      "type": "string"
                    },
                    "starts_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "token_only": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "starts_at",
                    "ends_at",
                    "discount_percent",
                    "set_by",
                    "active"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "pricing": {
                "properties": {
                  "audio_cached_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "audio_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "audio_input_per_minute": {
                    "type": "number"
                  },
                  "audio_output": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "audio_output_per_minute": {
                    "type": "number"
                  },
                  "billing_unit": {
                    "type": "string"
                  },
                  "cache_creation": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "cache_creation_12h": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "cache_creation_1h": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "cached_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "diarization_per_minute": {
                    "type": "number"
                  },
                  "free_reference_images": {
                    "type": "integer"
                  },
                  "google_search_price_per_prompt": {
                    "type": "number"
                  },
                  "google_search_price_per_query": {
                    "type": "number"
                  },
                  "image_cached_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "image_input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "image_output": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "image_prices": {
                    "additionalProperties": {
                      "additionalProperties": {
                        "type": "number"
                      },
                      "type": "object"
                    },
                    "type": "object"
                  },
                  "input": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "input_surcharge_multiplier": {
                    "type": "number"
                  },
                  "input_surcharge_threshold_tokens": {
                    "type": "integer"
                  },
                  "input_transcription_per_minute": {
                    "additionalProperties": {
                      "type": "number"
                    },
                    "type": "object"
                  },
                  "openai_code_interpreter_price_per_session": {
                    "type": "number"
                  },
                  "openai_file_search_price_per_call": {
                    "type": "number"
                  },
                  "openai_web_search_price_per_call": {
                    "type": "number"
                  },
                  "output": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "output_surcharge_multiplier": {
                    "type": "number"
                  },
                  "price_first_megapixel": {
                    "type": "number"
                  },
                  "price_per_extra_reference_image": {
                    "type": "number"
                  },
                  "price_per_generation": {
                    "type": "number"
                  },
                  "price_per_m_bytes": {
                    "type": "number"
                  },
                  "price_per_m_chars": {
                    "type": "number"
                  },
                  "price_per_megapixel": {
                    "type": "number"
                  },
                  "price_per_minute": {
                    "type": "number"
                  },
                  "price_per_page": {
                    "type": "number"
                  },
                  "price_per_second": {
                    "type": "number"
                  },
                  "price_per_second_audio": {
                    "type": "number"
                  },
                  "price_per_second_by_resolution": {
                    "additionalProperties": {
                      "type": "number"
                    },
                    "type": "object"
                  },
                  "price_per_second_voice": {
                    "type": "number"
                  },
                  "price_vector_style": {
                    "type": "number"
                  },
                  "rates": {
                    "items": {
                      "properties": {
                        "amount": {
                          "type": "number"
                        },
                        "dimensions": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "unit",
                        "amount"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "reasoning": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "reported_cost_markup": {
                    "type": "number"
                  },
                  "thresholds": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "web_fetch_price_per_request": {
                    "type": "number"
                  },
                  "web_search_price_per_request": {
                    "type": "number"
                  },
                  "xai_x_search_price_per_call": {
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "provider": {
                "properties": {
                  "display_name": {
                    "type": "string"
                  },
                  "owner_country": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  }
                },
                "required": [
                  "slug",
                  "display_name"
                ],
                "type": "object"
              },
              "provider_display_name": {
                "type": "string"
              },
              "quality": {
                "type": "string"
              },
              "quantization": {
                "type": "string"
              },
              "recurring_price_windows": {
                "description": "Daily local-clock windows in one IANA timezone",
                "items": {
                  "oneOf": [
                    {
                      "required": [
                        "discount_percent"
                      ]
                    },
                    {
                      "required": [
                        "pricing"
                      ]
                    }
                  ],
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "discount_percent": {
                      "exclusiveMinimum": 0,
                      "maximum": 100,
                      "multipleOf": 0.01,
                      "type": "number"
                    },
                    "end": {
                      "type": "string"
                    },
                    "pricing": {
                      "additionalProperties": false,
                      "properties": {
                        "audio_cached_input": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "audio_input": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "audio_input_per_minute": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "audio_output": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "audio_output_per_minute": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "cache_creation": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "cache_creation_12h": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "cache_creation_1h": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "cached_input": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "diarization_per_minute": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "google_search_price_per_prompt": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "google_search_price_per_query": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "image_cached_input": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "image_input": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "image_output": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "image_prices": {
                          "additionalProperties": {
                            "additionalProperties": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minProperties": 1,
                            "type": "object"
                          },
                          "minProperties": 1,
                          "type": "object"
                        },
                        "input": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "input_transcription_per_minute": {
                          "additionalProperties": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minProperties": 1,
                          "type": "object"
                        },
                        "openai_code_interpreter_price_per_session": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "openai_file_search_price_per_call": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "openai_web_search_price_per_call": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "output": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "price_first_megapixel": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_billable_unit": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_extra_reference_image": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_generation": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_m_bytes": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_m_chars": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_megapixel": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_minute": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_page": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_second": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_second_audio": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_per_second_by_resolution": {
                          "additionalProperties": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minProperties": 1,
                          "type": "object"
                        },
                        "price_per_second_voice": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "price_vector_style": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "reasoning": {
                          "items": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "reported_cost_markup": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "video_token_prices": {
                          "additionalProperties": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "minProperties": 1,
                          "type": "object"
                        },
                        "web_fetch_price_per_request": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "web_search_price_per_request": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "xai_x_search_price_per_call": {
                          "minimum": 0,
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "start": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "start",
                    "end",
                    "timezone"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "references": {
                "items": {
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "url"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "region": {
                "type": "string"
              },
              "release": {
                "properties": {
                  "date": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "date",
                  "source"
                ],
                "type": "object"
              },
              "retired_at": {
                "format": "date-time",
                "type": "string"
              },
              "route": {
                "properties": {
                  "access": {
                    "type": "string"
                  },
                  "country": {
                    "deprecated": true,
                    "description": "Deprecated: read inference_location. The English name of inference_location when that is one country (SE reads Sweden); absent otherwise.",
                    "type": "string"
                  },
                  "data_handling": {
                    "properties": {
                      "caching": {
                        "properties": {
                          "default": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          },
                          "storage_location": {
                            "type": "string"
                          },
                          "ttl_seconds": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "default"
                        ],
                        "type": "object"
                      },
                      "logging": {
                        "properties": {
                          "default": {
                            "type": "string"
                          },
                          "human_review": {
                            "type": "string"
                          },
                          "retention_days": {
                            "type": "integer"
                          },
                          "storage_location": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "default",
                          "retention_days"
                        ],
                        "type": "object"
                      },
                      "moderation": {
                        "properties": {
                          "default": {
                            "type": "string"
                          },
                          "human_review": {
                            "type": "string"
                          },
                          "retention_days": {
                            "type": "integer"
                          },
                          "storage_location": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "default",
                          "retention_days"
                        ],
                        "type": "object"
                      },
                      "residency_enforced": {
                        "type": "boolean"
                      },
                      "subprocessors_read_content": {
                        "type": "boolean"
                      },
                      "training": {
                        "properties": {
                          "default": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "default"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "training",
                      "logging",
                      "moderation",
                      "caching"
                    ],
                    "type": "object"
                  },
                  "gdpr": {
                    "properties": {
                      "dpa_available": {
                        "type": "boolean"
                      },
                      "residency": {
                        "type": "string"
                      },
                      "transfer_mechanism": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "residency",
                      "transfer_mechanism"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "type": "string"
                  },
                  "inference_location": {
                    "type": "string"
                  },
                  "last_verified_at": {
                    "type": "string"
                  },
                  "native_region": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  },
                  "provider_display_name": {
                    "type": "string"
                  },
                  "region": {
                    "description": "The residency bucket of inference_location: EU for an EU member state or the EU area",
                    "type": "string"
                  },
                  "sources": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "underlying_maker": {
                    "type": "string"
                  },
                  "verification": {
                    "properties": {
                      "attested_at": {
                        "type": "string"
                      },
                      "opper_verified_at": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "verified_by": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "status"
                    ],
                    "type": "object"
                  },
                  "zdr": {
                    "properties": {
                      "caching": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "logging": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "moderation": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "subprocessors": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "training": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "logging",
                      "moderation",
                      "caching",
                      "training",
                      "subprocessors"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "id",
                  "provider",
                  "provider_display_name",
                  "native_region",
                  "data_handling",
                  "gdpr",
                  "region"
                ],
                "type": "object"
              },
              "server_tools": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "service_route": {
                "properties": {
                  "adapter": {
                    "type": "string"
                  },
                  "id": {
                    "description": "The service route's id: what model access rules and locks match on. It never changes; a rename changes name only.",
                    "type": "string"
                  },
                  "name": {
                    "description": "What to show a person for this service route. It can change; use id to tell routes apart. Absent while a route has no name.",
                    "type": "string"
                  },
                  "uuid": {
                    "description": "A second identifier for the service route that never changes. An opaque value: compare it and do not parse it.",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "adapter"
                ],
                "type": "object"
              },
              "service_tier": {
                "description": "Processing tier of this endpoint when it is not the provider default: flex (discounted and slower; may be out of capacity) or priority / ultrafast (faster at a premium) or economy (the same model sold cheaper and slower under its own model id) or batch (POST /v3/batches only) or background_2h / background_8h (a discounted background run that completes within the window: send background true with background_options.completion_window on the Responses API). Absent on default-tier endpoints. Reach flex / priority / ultrafast / economy with the service_tier request field or by this endpoint's id.",
                "enum": [
                  "flex",
                  "priority",
                  "ultrafast",
                  "economy",
                  "batch",
                  "background_2h",
                  "background_8h"
                ],
                "type": "string"
              },
              "short_description": {
                "type": "string"
              },
              "speed": {
                "type": "string"
              },
              "successor": {
                "type": "string"
              },
              "thinking": {
                "type": "boolean"
              },
              "type": {
                "type": "string"
              },
              "usage_notes": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "id",
              "type",
              "provider",
              "provider_display_name",
              "name",
              "model_id",
              "capabilities",
              "speed",
              "quality",
              "context_window",
              "description",
              "service_route"
            ],
            "type": "object"
          },
          "model_id": {
            "type": "string"
          },
          "reasoning": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "model_id",
          "category",
          "reasoning"
        ],
        "type": "object"
      },
      "ModelsResponse": {
        "properties": {
          "has_more": {
            "description": "True when more rows follow this page. Request the next page with offset set to next_offset.",
            "type": "boolean"
          },
          "limit": {
            "type": "integer"
          },
          "models": {
            "items": {
              "properties": {
                "access": {
                  "type": "string"
                },
                "access_group": {
                  "type": "string"
                },
                "alias_only": {
                  "type": "boolean"
                },
                "aliases": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "api_type": {
                  "type": "string"
                },
                "benchmarks": {
                  "properties": {
                    "aa_slug": {
                      "type": "string"
                    },
                    "agentic_index": {
                      "type": "number"
                    },
                    "as_of": {
                      "type": "string"
                    },
                    "coding_index": {
                      "type": "number"
                    },
                    "evaluations": {
                      "properties": {
                        "aime": {
                          "type": "number"
                        },
                        "aime_25": {
                          "type": "number"
                        },
                        "automationbench_aa": {
                          "type": "number"
                        },
                        "frontiercode_v2_0": {
                          "type": "number"
                        },
                        "gpqa": {
                          "type": "number"
                        },
                        "hle": {
                          "type": "number"
                        },
                        "ifbench": {
                          "type": "number"
                        },
                        "lcr": {
                          "type": "number"
                        },
                        "livecodebench": {
                          "type": "number"
                        },
                        "math_500": {
                          "type": "number"
                        },
                        "mmlu_pro": {
                          "type": "number"
                        },
                        "scicode": {
                          "type": "number"
                        },
                        "tau2": {
                          "type": "number"
                        },
                        "terminalbench_hard": {
                          "type": "number"
                        },
                        "terminalbench_v4_0": {
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "finance_index": {
                      "type": "number"
                    },
                    "healthcare_index": {
                      "type": "number"
                    },
                    "intelligence_index": {
                      "type": "number"
                    },
                    "legal_index": {
                      "type": "number"
                    },
                    "math_index": {
                      "type": "number"
                    },
                    "multilingual_index": {
                      "type": "number"
                    },
                    "scores": {
                      "properties": {
                        "agents": {
                          "type": "number"
                        },
                        "agents_previous": {
                          "type": "boolean"
                        },
                        "coding": {
                          "type": "number"
                        },
                        "coding_previous": {
                          "type": "boolean"
                        },
                        "finance": {
                          "type": "number"
                        },
                        "healthcare": {
                          "type": "number"
                        },
                        "intelligence": {
                          "type": "number"
                        },
                        "legal": {
                          "type": "number"
                        },
                        "multilingual": {
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "source": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "source",
                    "as_of"
                  ],
                  "type": "object"
                },
                "capabilities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "compliance": {
                  "properties": {
                    "cache_scope": {
                      "type": "string"
                    },
                    "cache_ttl_seconds": {
                      "type": "integer"
                    },
                    "caching": {
                      "type": "string"
                    },
                    "content_storage": {
                      "type": "string"
                    },
                    "country": {
                      "deprecated": true,
                      "description": "Deprecated: read inference_location. The English name of inference_location when that is one country (SE reads Sweden); absent otherwise.",
                      "type": "string"
                    },
                    "dpa_available": {
                      "type": "boolean"
                    },
                    "inference_location": {
                      "type": "string"
                    },
                    "logging": {
                      "type": "string"
                    },
                    "moderation": {
                      "type": "string"
                    },
                    "residency": {
                      "type": "string"
                    },
                    "retention_days": {
                      "type": "integer"
                    },
                    "route_id": {
                      "type": "string"
                    },
                    "storage_location": {
                      "type": "string"
                    },
                    "third_party_access": {
                      "type": "boolean"
                    },
                    "training": {
                      "type": "string"
                    },
                    "transfer_mechanism": {
                      "type": "string"
                    },
                    "zdr": {
                      "properties": {
                        "caching": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "logging": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "moderation": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "subprocessors": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "training": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "logging",
                        "moderation",
                        "caching",
                        "training",
                        "subprocessors"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "dpa_available",
                    "third_party_access"
                  ],
                  "type": "object"
                },
                "context_window": {
                  "type": "integer"
                },
                "cost": {
                  "type": "number"
                },
                "country": {
                  "deprecated": true,
                  "description": "Deprecated: read compliance.inference_location on /v3/models. The English name of that location when it is one country (SE reads Sweden); absent otherwise.",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "family": {
                  "type": "string"
                },
                "featured": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string"
                },
                "input_modalities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "list_pricing": {
                  "description": "The undiscounted selected price while a percentage discount applies; for an explicit scheduled tariff this is that tariff before its campaign discount. pricing carries the effective price. Absent without a percentage adjustment.",
                  "properties": {
                    "audio_cached_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "audio_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "audio_input_per_minute": {
                      "type": "number"
                    },
                    "audio_output": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "audio_output_per_minute": {
                      "type": "number"
                    },
                    "billing_unit": {
                      "type": "string"
                    },
                    "cache_creation": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "cache_creation_12h": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "cache_creation_1h": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "cached_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "diarization_per_minute": {
                      "type": "number"
                    },
                    "free_reference_images": {
                      "type": "integer"
                    },
                    "google_search_price_per_prompt": {
                      "type": "number"
                    },
                    "google_search_price_per_query": {
                      "type": "number"
                    },
                    "image_cached_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "image_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "image_output": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "image_prices": {
                      "additionalProperties": {
                        "additionalProperties": {
                          "type": "number"
                        },
                        "type": "object"
                      },
                      "type": "object"
                    },
                    "input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "input_surcharge_multiplier": {
                      "type": "number"
                    },
                    "input_surcharge_threshold_tokens": {
                      "type": "integer"
                    },
                    "input_transcription_per_minute": {
                      "additionalProperties": {
                        "type": "number"
                      },
                      "type": "object"
                    },
                    "openai_code_interpreter_price_per_session": {
                      "type": "number"
                    },
                    "openai_file_search_price_per_call": {
                      "type": "number"
                    },
                    "openai_web_search_price_per_call": {
                      "type": "number"
                    },
                    "output": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "output_surcharge_multiplier": {
                      "type": "number"
                    },
                    "price_first_megapixel": {
                      "type": "number"
                    },
                    "price_per_extra_reference_image": {
                      "type": "number"
                    },
                    "price_per_generation": {
                      "type": "number"
                    },
                    "price_per_m_bytes": {
                      "type": "number"
                    },
                    "price_per_m_chars": {
                      "type": "number"
                    },
                    "price_per_megapixel": {
                      "type": "number"
                    },
                    "price_per_minute": {
                      "type": "number"
                    },
                    "price_per_page": {
                      "type": "number"
                    },
                    "price_per_second": {
                      "type": "number"
                    },
                    "price_per_second_audio": {
                      "type": "number"
                    },
                    "price_per_second_by_resolution": {
                      "additionalProperties": {
                        "type": "number"
                      },
                      "type": "object"
                    },
                    "price_per_second_voice": {
                      "type": "number"
                    },
                    "price_vector_style": {
                      "type": "number"
                    },
                    "rates": {
                      "items": {
                        "properties": {
                          "amount": {
                            "type": "number"
                          },
                          "dimensions": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "unit": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "unit",
                          "amount"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "reasoning": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "reported_cost_markup": {
                      "type": "number"
                    },
                    "thresholds": {
                      "items": {
                        "type": "integer"
                      },
                      "type": "array"
                    },
                    "web_fetch_price_per_request": {
                      "type": "number"
                    },
                    "web_search_price_per_request": {
                      "type": "number"
                    },
                    "xai_x_search_price_per_call": {
                      "type": "number"
                    }
                  },
                  "type": "object"
                },
                "long_description": {
                  "type": "string"
                },
                "maker": {
                  "properties": {
                    "country": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "slug"
                  ],
                  "type": "object"
                },
                "maker_country": {
                  "type": "string"
                },
                "max_output_tokens": {
                  "type": "integer"
                },
                "model": {
                  "type": "string"
                },
                "model_id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "next_price_change_at": {
                  "description": "The next instant at which this quote or its active adjustment can change. Refetch prices at this boundary.",
                  "format": "date-time",
                  "type": "string"
                },
                "output_modalities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "params": {
                  "properties": {
                    "caller_params": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "default_max_tokens": {
                      "type": "integer"
                    },
                    "embedding": {
                      "properties": {
                        "dimensions": {
                          "type": "integer"
                        },
                        "max_input_tokens": {
                          "type": "integer"
                        },
                        "supports_dimensions": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "dimensions"
                      ],
                      "type": "object"
                    },
                    "image": {
                      "properties": {
                        "aspect_ratios": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "default": {
                          "type": "string"
                        },
                        "parameters": {
                          "items": {
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "enum": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "example": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "qualities": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "resolutions": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "size_constraints": {
                          "properties": {
                            "max_edge": {
                              "type": "integer"
                            },
                            "max_pixels": {
                              "type": "integer"
                            },
                            "max_ratio": {
                              "type": "integer"
                            },
                            "min_edge": {
                              "type": "integer"
                            },
                            "min_pixels": {
                              "type": "integer"
                            },
                            "multiple_of": {
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        },
                        "sizes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "styles": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "image_edit": {
                      "properties": {
                        "aspect_ratios": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "default": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "max_tokens": {
                      "type": "boolean"
                    },
                    "realtime": {
                      "properties": {
                        "default_voice": {
                          "type": "string"
                        },
                        "diarize": {
                          "type": "boolean"
                        },
                        "input_audio_format": {
                          "type": "string"
                        },
                        "input_audio_formats": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "input_sample_rate": {
                          "type": "integer"
                        },
                        "languages": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "output_audio_format": {
                          "type": "string"
                        },
                        "output_sample_rate": {
                          "type": "integer"
                        },
                        "parameters": {
                          "items": {
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "enum": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "example": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "reasoning": {
                          "properties": {
                            "default": {
                              "type": "string"
                            },
                            "history": {
                              "type": "string"
                            },
                            "max_budget": {
                              "type": "integer"
                            },
                            "mode": {
                              "type": "string"
                            },
                            "supported": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "wire": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "supported",
                            "default"
                          ],
                          "type": "object"
                        },
                        "sample_rate": {
                          "type": "integer"
                        },
                        "semantic_vad": {
                          "type": "boolean"
                        },
                        "supports_tools": {
                          "type": "boolean"
                        },
                        "supports_vad": {
                          "type": "boolean"
                        },
                        "voices": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "reasoning": {
                      "properties": {
                        "default": {
                          "type": "string"
                        },
                        "history": {
                          "type": "string"
                        },
                        "max_budget": {
                          "type": "integer"
                        },
                        "mode": {
                          "type": "string"
                        },
                        "supported": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "wire": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "supported",
                        "default"
                      ],
                      "type": "object"
                    },
                    "stt": {
                      "properties": {
                        "default_language": {
                          "type": "string"
                        },
                        "diarize": {
                          "type": "boolean"
                        },
                        "formats": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "languages": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "parameters": {
                          "items": {
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "enum": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "example": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "stream": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    },
                    "temperature": {
                      "properties": {
                        "default": {
                          "type": "number"
                        },
                        "max": {
                          "type": "number"
                        },
                        "min": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "min",
                        "max",
                        "default"
                      ],
                      "type": "object"
                    },
                    "tts": {
                      "properties": {
                        "default_voice": {
                          "type": "string"
                        },
                        "formats": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "max_length": {
                          "type": "integer"
                        },
                        "parameters": {
                          "items": {
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "enum": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "example": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "voices": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "video": {
                      "properties": {
                        "aspect_ratios": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "durations": {
                          "items": {
                            "type": "integer"
                          },
                          "type": "array"
                        },
                        "max_duration": {
                          "type": "integer"
                        },
                        "max_fps": {
                          "type": "integer"
                        },
                        "max_frames": {
                          "type": "integer"
                        },
                        "min_duration": {
                          "type": "integer"
                        },
                        "parameters": {
                          "items": {
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "enum": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "example": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "resolutions": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "speed_modes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "supports_seed": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                },
                "performance": {
                  "properties": {
                    "tokens_per_second": {
                      "description": "Output tokens per second of call duration over the last day of Opper traffic",
                      "type": "integer"
                    },
                    "ttft_ms": {
                      "description": "Median time to first token in milliseconds over the last day of Opper traffic",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                },
                "policy": {
                  "properties": {
                    "allowed": {
                      "type": "boolean"
                    },
                    "blocked_by": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "allowed"
                  ],
                  "type": "object"
                },
                "pooled": {
                  "type": "boolean"
                },
                "price_campaigns": {
                  "description": "Running and upcoming price campaigns on this endpoint",
                  "items": {
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "discount_percent": {
                        "type": "number"
                      },
                      "ends_at": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "set_by": {
                        "type": "string"
                      },
                      "starts_at": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "token_only": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "starts_at",
                      "ends_at",
                      "discount_percent",
                      "set_by",
                      "active"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "pricing": {
                  "properties": {
                    "audio_cached_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "audio_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "audio_input_per_minute": {
                      "type": "number"
                    },
                    "audio_output": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "audio_output_per_minute": {
                      "type": "number"
                    },
                    "billing_unit": {
                      "type": "string"
                    },
                    "cache_creation": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "cache_creation_12h": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "cache_creation_1h": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "cached_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "diarization_per_minute": {
                      "type": "number"
                    },
                    "free_reference_images": {
                      "type": "integer"
                    },
                    "google_search_price_per_prompt": {
                      "type": "number"
                    },
                    "google_search_price_per_query": {
                      "type": "number"
                    },
                    "image_cached_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "image_input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "image_output": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "image_prices": {
                      "additionalProperties": {
                        "additionalProperties": {
                          "type": "number"
                        },
                        "type": "object"
                      },
                      "type": "object"
                    },
                    "input": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "input_surcharge_multiplier": {
                      "type": "number"
                    },
                    "input_surcharge_threshold_tokens": {
                      "type": "integer"
                    },
                    "input_transcription_per_minute": {
                      "additionalProperties": {
                        "type": "number"
                      },
                      "type": "object"
                    },
                    "openai_code_interpreter_price_per_session": {
                      "type": "number"
                    },
                    "openai_file_search_price_per_call": {
                      "type": "number"
                    },
                    "openai_web_search_price_per_call": {
                      "type": "number"
                    },
                    "output": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "output_surcharge_multiplier": {
                      "type": "number"
                    },
                    "price_first_megapixel": {
                      "type": "number"
                    },
                    "price_per_extra_reference_image": {
                      "type": "number"
                    },
                    "price_per_generation": {
                      "type": "number"
                    },
                    "price_per_m_bytes": {
                      "type": "number"
                    },
                    "price_per_m_chars": {
                      "type": "number"
                    },
                    "price_per_megapixel": {
                      "type": "number"
                    },
                    "price_per_minute": {
                      "type": "number"
                    },
                    "price_per_page": {
                      "type": "number"
                    },
                    "price_per_second": {
                      "type": "number"
                    },
                    "price_per_second_audio": {
                      "type": "number"
                    },
                    "price_per_second_by_resolution": {
                      "additionalProperties": {
                        "type": "number"
                      },
                      "type": "object"
                    },
                    "price_per_second_voice": {
                      "type": "number"
                    },
                    "price_vector_style": {
                      "type": "number"
                    },
                    "rates": {
                      "items": {
                        "properties": {
                          "amount": {
                            "type": "number"
                          },
                          "dimensions": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "unit": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "unit",
                          "amount"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "reasoning": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "reported_cost_markup": {
                      "type": "number"
                    },
                    "thresholds": {
                      "items": {
                        "type": "integer"
                      },
                      "type": "array"
                    },
                    "web_fetch_price_per_request": {
                      "type": "number"
                    },
                    "web_search_price_per_request": {
                      "type": "number"
                    },
                    "xai_x_search_price_per_call": {
                      "type": "number"
                    }
                  },
                  "type": "object"
                },
                "provider": {
                  "properties": {
                    "display_name": {
                      "type": "string"
                    },
                    "owner_country": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "slug",
                    "display_name"
                  ],
                  "type": "object"
                },
                "provider_display_name": {
                  "type": "string"
                },
                "quality": {
                  "type": "string"
                },
                "quantization": {
                  "type": "string"
                },
                "recurring_price_windows": {
                  "description": "Daily local-clock windows in one IANA timezone",
                  "items": {
                    "oneOf": [
                      {
                        "required": [
                          "discount_percent"
                        ]
                      },
                      {
                        "required": [
                          "pricing"
                        ]
                      }
                    ],
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "discount_percent": {
                        "exclusiveMinimum": 0,
                        "maximum": 100,
                        "multipleOf": 0.01,
                        "type": "number"
                      },
                      "end": {
                        "type": "string"
                      },
                      "pricing": {
                        "additionalProperties": false,
                        "properties": {
                          "audio_cached_input": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "audio_input": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "audio_input_per_minute": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "audio_output": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "audio_output_per_minute": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "cache_creation": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "cache_creation_12h": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "cache_creation_1h": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "cached_input": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "diarization_per_minute": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "google_search_price_per_prompt": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "google_search_price_per_query": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "image_cached_input": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "image_input": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "image_output": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "image_prices": {
                            "additionalProperties": {
                              "additionalProperties": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "minProperties": 1,
                              "type": "object"
                            },
                            "minProperties": 1,
                            "type": "object"
                          },
                          "input": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "input_transcription_per_minute": {
                            "additionalProperties": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minProperties": 1,
                            "type": "object"
                          },
                          "openai_code_interpreter_price_per_session": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "openai_file_search_price_per_call": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "openai_web_search_price_per_call": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "output": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "price_first_megapixel": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_billable_unit": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_extra_reference_image": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_generation": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_m_bytes": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_m_chars": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_megapixel": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_minute": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_page": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_second": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_second_audio": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_per_second_by_resolution": {
                            "additionalProperties": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minProperties": 1,
                            "type": "object"
                          },
                          "price_per_second_voice": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "price_vector_style": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "reasoning": {
                            "items": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "reported_cost_markup": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "video_token_prices": {
                            "additionalProperties": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "minProperties": 1,
                            "type": "object"
                          },
                          "web_fetch_price_per_request": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "web_search_price_per_request": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "xai_x_search_price_per_call": {
                            "minimum": 0,
                            "type": "number"
                          }
                        },
                        "type": "object"
                      },
                      "start": {
                        "type": "string"
                      },
                      "timezone": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "start",
                      "end",
                      "timezone"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "references": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "updated_at": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "url"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "region": {
                  "type": "string"
                },
                "release": {
                  "properties": {
                    "date": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "date",
                    "source"
                  ],
                  "type": "object"
                },
                "retired_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "route": {
                  "properties": {
                    "access": {
                      "type": "string"
                    },
                    "country": {
                      "deprecated": true,
                      "description": "Deprecated: read inference_location. The English name of inference_location when that is one country (SE reads Sweden); absent otherwise.",
                      "type": "string"
                    },
                    "data_handling": {
                      "properties": {
                        "caching": {
                          "properties": {
                            "default": {
                              "type": "string"
                            },
                            "scope": {
                              "type": "string"
                            },
                            "storage_location": {
                              "type": "string"
                            },
                            "ttl_seconds": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "default"
                          ],
                          "type": "object"
                        },
                        "logging": {
                          "properties": {
                            "default": {
                              "type": "string"
                            },
                            "human_review": {
                              "type": "string"
                            },
                            "retention_days": {
                              "type": "integer"
                            },
                            "storage_location": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "default",
                            "retention_days"
                          ],
                          "type": "object"
                        },
                        "moderation": {
                          "properties": {
                            "default": {
                              "type": "string"
                            },
                            "human_review": {
                              "type": "string"
                            },
                            "retention_days": {
                              "type": "integer"
                            },
                            "storage_location": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "default",
                            "retention_days"
                          ],
                          "type": "object"
                        },
                        "residency_enforced": {
                          "type": "boolean"
                        },
                        "subprocessors_read_content": {
                          "type": "boolean"
                        },
                        "training": {
                          "properties": {
                            "default": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "default"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "training",
                        "logging",
                        "moderation",
                        "caching"
                      ],
                      "type": "object"
                    },
                    "gdpr": {
                      "properties": {
                        "dpa_available": {
                          "type": "boolean"
                        },
                        "residency": {
                          "type": "string"
                        },
                        "transfer_mechanism": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "residency",
                        "transfer_mechanism"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "type": "string"
                    },
                    "inference_location": {
                      "type": "string"
                    },
                    "last_verified_at": {
                      "type": "string"
                    },
                    "native_region": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "provider_display_name": {
                      "type": "string"
                    },
                    "region": {
                      "description": "The residency bucket of inference_location: EU for an EU member state or the EU area",
                      "type": "string"
                    },
                    "sources": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "underlying_maker": {
                      "type": "string"
                    },
                    "verification": {
                      "properties": {
                        "attested_at": {
                          "type": "string"
                        },
                        "opper_verified_at": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "verified_by": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "type": "object"
                    },
                    "zdr": {
                      "properties": {
                        "caching": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "logging": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "moderation": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "subprocessors": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "training": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "logging",
                        "moderation",
                        "caching",
                        "training",
                        "subprocessors"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "provider",
                    "provider_display_name",
                    "native_region",
                    "data_handling",
                    "gdpr",
                    "region"
                  ],
                  "type": "object"
                },
                "server_tools": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "service_route": {
                  "properties": {
                    "adapter": {
                      "type": "string"
                    },
                    "id": {
                      "description": "The service route's id: what model access rules and locks match on. It never changes; a rename changes name only.",
                      "type": "string"
                    },
                    "name": {
                      "description": "What to show a person for this service route. It can change; use id to tell routes apart. Absent while a route has no name.",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "A second identifier for the service route that never changes. An opaque value: compare it and do not parse it.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "adapter"
                  ],
                  "type": "object"
                },
                "service_tier": {
                  "description": "Processing tier of this endpoint when it is not the provider default: flex (discounted and slower; may be out of capacity) or priority / ultrafast (faster at a premium) or economy (the same model sold cheaper and slower under its own model id) or batch (POST /v3/batches only) or background_2h / background_8h (a discounted background run that completes within the window: send background true with background_options.completion_window on the Responses API). Absent on default-tier endpoints. Reach flex / priority / ultrafast / economy with the service_tier request field or by this endpoint's id.",
                  "enum": [
                    "flex",
                    "priority",
                    "ultrafast",
                    "economy",
                    "batch",
                    "background_2h",
                    "background_8h"
                  ],
                  "type": "string"
                },
                "short_description": {
                  "type": "string"
                },
                "speed": {
                  "type": "string"
                },
                "successor": {
                  "type": "string"
                },
                "thinking": {
                  "type": "boolean"
                },
                "type": {
                  "type": "string"
                },
                "usage_notes": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "id",
                "type",
                "provider",
                "provider_display_name",
                "name",
                "model_id",
                "capabilities",
                "speed",
                "quality",
                "context_window",
                "description",
                "service_route"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "next_offset": {
            "description": "Offset of the next page. Present only when has_more is true.",
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "models",
          "total",
          "offset",
          "limit",
          "has_more"
        ],
        "type": "object"
      },
      "MusicJobResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status_url"
        ],
        "type": "object"
      },
      "MusicRequest": {
        "properties": {
          "async": {
            "description": "Run generation on the background worker and return a job to poll (202) instead of waiting inline (200). Use for full-length tracks and slow models.",
            "type": "boolean"
          },
          "duration_seconds": {
            "description": "Requested length in seconds (up to 600). Omit it to let the model choose. Limits differ by model, and some models have no length setting; a value a model cannot honor answers 400 naming its limit.",
            "type": "number"
          },
          "format": {
            "description": "Output audio format: mp3, wav, opus or pcm. Omit it to get the model's native format. A format the model cannot produce answers 400 naming the ones it can.",
            "type": "string"
          },
          "instrumental": {
            "description": "Music only: generate without vocals.",
            "type": "boolean"
          },
          "loop": {
            "description": "Generate audio that repeats seamlessly, for ambience and hums. Needs a model with the audio_loop capability (GET /v3/audio/models?capability=audio_loop); other models answer 400.",
            "type": "boolean"
          },
          "max_retries": {
            "default": 2,
            "description": "Retries on the same endpoint when the provider rejects the call before doing any work (HTTP 429 or a gateway 502/503/504 with no result, or a connection that never reached it). Only the successful attempt is billed. Default 2 / max 3; 0 turns retries off.",
            "maximum": 3,
            "minimum": 0,
            "type": "integer"
          },
          "model": {
            "description": "Audio generation model id. List them with GET /v3/audio/models: ?type=music for songs and scores, ?type=sound for sound effects and ambience, ?capability=audio_sections or ?capability=audio_loop for models that take those fields. For example elevenlabs/music_v2_5 (music) or elevenlabs/eleven_text_to_sound_v2 (sound effects).",
            "type": "string"
          },
          "parameters": {
            "description": "Provider-specific fields forwarded verbatim, except fields owned by normalized inputs and shared-account song selectors. Use scoped sections for song references; the provider validates other settings.",
            "type": "object"
          },
          "prompt": {
            "description": "What to generate. For music: genre, mood, instruments, lyrics. For a sound effect: the sound itself, for example \"a single hammer strike on an iron anvil\". Required unless sections are set.",
            "type": "string"
          },
          "sections": {
            "description": "A timed plan for music that must fit a picture: each section's duration_ms plus its own prompt and styles, in order. The sections set the total length, so duration_seconds is not sent with them. Needs a model with the audio_sections capability (GET /v3/audio/models?capability=audio_sections); other models answer 400.",
            "items": {
              "properties": {
                "condition_on": {
                  "properties": {
                    "end_ms": {
                      "type": "integer"
                    },
                    "song": {
                      "type": "string"
                    },
                    "start_ms": {
                      "type": "integer"
                    },
                    "strength": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "song",
                    "start_ms",
                    "end_ms"
                  ],
                  "type": "object"
                },
                "context_adherence": {
                  "type": "string"
                },
                "duration_ms": {
                  "description": "Length of this section in milliseconds. Models set their own per-section limits and answer 400 outside them.",
                  "type": "integer"
                },
                "end_ms": {
                  "type": "integer"
                },
                "lyrics": {
                  "description": "Words to be sung in this section. Leave it empty for an instrumental section.",
                  "type": "string"
                },
                "negative_styles": {
                  "description": "Styles this section should avoid, for example [\"vocals\"].",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "prompt": {
                  "description": "What this section should sound like, in words, for example \"a quiet piano intro\" or \"strings build to a swell\". It describes the music and is never sung; put sung words in lyrics.",
                  "type": "string"
                },
                "song": {
                  "type": "string"
                },
                "start_ms": {
                  "type": "integer"
                },
                "styles": {
                  "description": "Styles this section should have, for example [\"sparse piano\", \"instrumental\"].",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "seed": {
            "description": "Seed for more repeatable output. Models without seed support answer 400.",
            "type": "integer"
          },
          "store": {
            "description": "Persist the generated audio to /v3/files and return a reusable file_id. Defaults to false; set true to store.",
            "type": "boolean"
          },
          "store_song": {
            "description": "Store a reusable song for inpainting, separately from store (which saves a file). Requires audio_song_storage and nonzero project retention.",
            "type": "boolean"
          }
        },
        "required": [
          "model"
        ],
        "type": "object"
      },
      "MusicResponse": {
        "properties": {
          "audio": {
            "properties": {
              "b64_json": {
                "type": "string"
              },
              "file_id": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "created": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "lyrics": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "plan": {
            "type": "object"
          },
          "song": {
            "properties": {
              "expires_at": {
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "expires_at"
            ],
            "type": "object"
          },
          "store_song_skipped": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "attempts": {
                "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
                "type": "integer"
              },
              "cost": {
                "type": "number"
              },
              "duration_seconds": {
                "type": "number"
              }
            },
            "required": [
              "cost"
            ],
            "type": "object"
          },
          "words_timestamps": {
            "items": {
              "properties": {
                "end_ms": {
                  "type": "integer"
                },
                "start_ms": {
                  "type": "integer"
                },
                "word": {
                  "type": "string"
                }
              },
              "required": [
                "word",
                "start_ms",
                "end_ms"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "model",
          "created",
          "audio",
          "usage"
        ],
        "type": "object"
      },
      "MusicUsage": {
        "properties": {
          "attempts": {
            "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
            "type": "integer"
          },
          "cost": {
            "type": "number"
          },
          "duration_seconds": {
            "type": "number"
          }
        },
        "required": [
          "cost"
        ],
        "type": "object"
      },
      "OCRDocument": {
        "properties": {
          "content": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "document_url": {
            "type": "string"
          },
          "file_id": {
            "type": "string"
          },
          "image_url": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "OCRPage": {
        "properties": {
          "blocks": {
            "items": {
              "properties": {
                "bottom_right_x": {
                  "type": "integer"
                },
                "bottom_right_y": {
                  "type": "integer"
                },
                "content": {
                  "type": "string"
                },
                "top_left_x": {
                  "type": "integer"
                },
                "top_left_y": {
                  "type": "integer"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "top_left_x",
                "top_left_y",
                "bottom_right_x",
                "bottom_right_y"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "confidence_scores": {
            "type": "object"
          },
          "dimensions": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object"
          },
          "elements": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "images": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "index": {
            "type": "integer"
          },
          "markdown": {
            "type": "string"
          }
        },
        "required": [
          "index",
          "markdown"
        ],
        "type": "object"
      },
      "OCRRequest": {
        "properties": {
          "document": {
            "properties": {
              "content": {
                "type": "string"
              },
              "document_name": {
                "type": "string"
              },
              "document_url": {
                "type": "string"
              },
              "file_id": {
                "type": "string"
              },
              "image_url": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          "image_limit": {
            "type": "integer"
          },
          "image_min_size": {
            "type": "integer"
          },
          "include_image_base64": {
            "type": "boolean"
          },
          "model": {
            "type": "string"
          },
          "pages": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "parameters": {
            "type": "object"
          }
        },
        "required": [
          "model",
          "document"
        ],
        "type": "object"
      },
      "OCRResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "pages": {
            "items": {
              "properties": {
                "blocks": {
                  "items": {
                    "properties": {
                      "bottom_right_x": {
                        "type": "integer"
                      },
                      "bottom_right_y": {
                        "type": "integer"
                      },
                      "content": {
                        "type": "string"
                      },
                      "top_left_x": {
                        "type": "integer"
                      },
                      "top_left_y": {
                        "type": "integer"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "top_left_x",
                      "top_left_y",
                      "bottom_right_x",
                      "bottom_right_y"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "confidence_scores": {
                  "type": "object"
                },
                "dimensions": {
                  "additionalProperties": {
                    "type": "integer"
                  },
                  "type": "object"
                },
                "elements": {
                  "items": {
                    "type": "object"
                  },
                  "type": "array"
                },
                "images": {
                  "items": {
                    "type": "object"
                  },
                  "type": "array"
                },
                "index": {
                  "type": "integer"
                },
                "markdown": {
                  "type": "string"
                }
              },
              "required": [
                "index",
                "markdown"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "usage": {
            "properties": {
              "cost": {
                "type": "number"
              },
              "pages_processed": {
                "type": "integer"
              }
            },
            "required": [
              "cost",
              "pages_processed"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "model",
          "pages",
          "usage"
        ],
        "type": "object"
      },
      "OCRUsage": {
        "properties": {
          "cost": {
            "type": "number"
          },
          "pages_processed": {
            "type": "integer"
          }
        },
        "required": [
          "cost",
          "pages_processed"
        ],
        "type": "object"
      },
      "ORError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "details": {
            "description": "Machine-readable context for the error, when there is any. Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
            "type": "object"
          },
          "message": {
            "type": "string"
          },
          "param": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "type"
        ],
        "type": "object"
      },
      "ORInputTokensDetails": {
        "properties": {
          "cached_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "cached_tokens"
        ],
        "type": "object"
      },
      "OROutputContent": {
        "properties": {
          "annotations": {
            "items": {
              "description": "Any value"
            },
            "type": "array"
          },
          "refusal": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "type": "object"
      },
      "OROutputItem": {
        "properties": {
          "action": {
            "type": "string"
          },
          "arguments": {
            "type": "string"
          },
          "cache_creation_tokens": {
            "type": "integer"
          },
          "cache_read_tokens": {
            "type": "integer"
          },
          "call_id": {
            "type": "string"
          },
          "content": {
            "items": {
              "properties": {
                "annotations": {
                  "items": {
                    "description": "Any value"
                  },
                  "type": "array"
                },
                "refusal": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "text"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "cost_usd": {
            "type": "number"
          },
          "encrypted_content": {
            "type": "string"
          },
          "execution_ms": {
            "type": "integer"
          },
          "findings": {
            "items": {
              "description": "Any value"
            },
            "type": "array"
          },
          "flagged": {
            "type": "boolean"
          },
          "guard_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "model_warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "models_used": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "summary": {
            "items": {
              "properties": {
                "text": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "text"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "OROutputTokensDetails": {
        "properties": {
          "reasoning_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "reasoning_tokens"
        ],
        "type": "object"
      },
      "ORReasoning": {
        "properties": {
          "effort": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ORRequest": {
        "properties": {
          "background": {
            "type": "boolean"
          },
          "cache_control": {
            "description": "Opt in to automatic prompt caching for Anthropic-family models: {\"type\":\"ephemeral\"} (optionally \"ttl\":\"1h\"). Places one moving cache breakpoint on the largest cacheable prefix. Caching is off unless set; no-op on providers with automatic server-side caching (OpenAI",
            "type": "object"
          },
          "frequency_penalty": {
            "type": "number"
          },
          "include": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "input": {
            "properties": {
              "Items": {
                "items": {
                  "properties": {
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "Text": {
                "type": "string"
              }
            },
            "required": [
              "Text",
              "Items"
            ],
            "type": "object"
          },
          "instructions": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "max_tool_calls": {
            "type": "integer"
          },
          "metadata": {
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "models": {
            "description": "Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in model and the rest here; or omit model and the first entry is the primary. Each entry is any model string: a bare pooled name; a provider/model id; an org alias. Not allowed together with a dynamic/\u003cname\u003e route. At most 10 entries. Which model answered is in the X-Opper-Served-Model header; the model field still echoes what you sent.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "presence_penalty": {
            "type": "number"
          },
          "previous_response_id": {
            "type": "string"
          },
          "reasoning": {
            "properties": {
              "effort": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "service_tier": {
            "description": "Processing tier. flex: discounted and slower; when the provider has no flex capacity the call fails with 429 instead of running at the full price. priority (alias fast): faster at a premium; falls back to the default tier. ultrafast: fastest; falls back to priority then default. economy: the same model cheaper and slower where a provider sells it under its own model id; it never falls back to the default tier. default and auto: the provider default. A model without an endpoint for the requested tier runs at the default tier. The tier that ran is in the X-Opper-Served-Service-Tier header.",
            "type": "string"
          },
          "store": {
            "type": "boolean"
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "text": {
            "properties": {
              "format": {
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "object"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "tool_choice": {
            "description": "Any value"
          },
          "tools": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object"
                },
                "strict": {
                  "type": "boolean"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "top_p": {
            "type": "number"
          },
          "truncation": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ORResponse": {
        "properties": {
          "completed_at": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer"
          },
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "type": "object"
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "message",
              "type"
            ],
            "type": "object"
          },
          "frequency_penalty": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "incomplete_details": {
            "description": "Any value"
          },
          "instructions": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "metadata": {
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "output": {
            "items": {
              "properties": {
                "action": {
                  "type": "string"
                },
                "arguments": {
                  "type": "string"
                },
                "cache_creation_tokens": {
                  "type": "integer"
                },
                "cache_read_tokens": {
                  "type": "integer"
                },
                "call_id": {
                  "type": "string"
                },
                "content": {
                  "items": {
                    "properties": {
                      "annotations": {
                        "items": {
                          "description": "Any value"
                        },
                        "type": "array"
                      },
                      "refusal": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "text"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "cost_usd": {
                  "type": "number"
                },
                "encrypted_content": {
                  "type": "string"
                },
                "execution_ms": {
                  "type": "integer"
                },
                "findings": {
                  "items": {
                    "description": "Any value"
                  },
                  "type": "array"
                },
                "flagged": {
                  "type": "boolean"
                },
                "guard_type": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "model_warnings": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "models_used": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "name": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "summary": {
                  "items": {
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "text"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "presence_penalty": {
            "type": "number"
          },
          "previous_response_id": {
            "type": "string"
          },
          "reasoning": {
            "properties": {
              "effort": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "service_tier": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "temperature": {
            "type": "number"
          },
          "text": {
            "properties": {
              "format": {
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "object"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "tool_choice": {
            "description": "Any value"
          },
          "tools": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object"
                },
                "strict": {
                  "type": "boolean"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "top_p": {
            "type": "number"
          },
          "truncation": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "cost": {
                "description": "Opper extension: execution cost in USD. Present on streaming response.completed events; non-stream surfaces the same value via the X-Opper-Cost header.",
                "type": "number"
              },
              "input_tokens": {
                "type": "integer"
              },
              "input_tokens_details": {
                "properties": {
                  "cached_tokens": {
                    "type": "integer"
                  }
                },
                "required": [
                  "cached_tokens"
                ],
                "type": "object"
              },
              "output_tokens": {
                "type": "integer"
              },
              "output_tokens_details": {
                "properties": {
                  "reasoning_tokens": {
                    "type": "integer"
                  }
                },
                "required": [
                  "reasoning_tokens"
                ],
                "type": "object"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "input_tokens",
              "output_tokens",
              "total_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "completed_at",
          "status",
          "model",
          "output",
          "error",
          "incomplete_details",
          "tool_choice"
        ],
        "type": "object"
      },
      "ORStreamEventCompleted": {
        "properties": {
          "response": {
            "properties": {
              "completed_at": {
                "type": "integer"
              },
              "created_at": {
                "type": "integer"
              },
              "error": {
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "details": {
                    "type": "object"
                  },
                  "message": {
                    "type": "string"
                  },
                  "param": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "message",
                  "type"
                ],
                "type": "object"
              },
              "frequency_penalty": {
                "type": "number"
              },
              "id": {
                "type": "string"
              },
              "incomplete_details": {
                "description": "Any value"
              },
              "instructions": {
                "type": "string"
              },
              "max_output_tokens": {
                "type": "integer"
              },
              "metadata": {
                "type": "object"
              },
              "model": {
                "type": "string"
              },
              "object": {
                "type": "string"
              },
              "output": {
                "items": {
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "arguments": {
                      "type": "string"
                    },
                    "cache_creation_tokens": {
                      "type": "integer"
                    },
                    "cache_read_tokens": {
                      "type": "integer"
                    },
                    "call_id": {
                      "type": "string"
                    },
                    "content": {
                      "items": {
                        "properties": {
                          "annotations": {
                            "items": {
                              "description": "Any value"
                            },
                            "type": "array"
                          },
                          "refusal": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "cost_usd": {
                      "type": "number"
                    },
                    "encrypted_content": {
                      "type": "string"
                    },
                    "execution_ms": {
                      "type": "integer"
                    },
                    "findings": {
                      "items": {
                        "description": "Any value"
                      },
                      "type": "array"
                    },
                    "flagged": {
                      "type": "boolean"
                    },
                    "guard_type": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "model_warnings": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "models_used": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "summary": {
                      "items": {
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "parallel_tool_calls": {
                "type": "boolean"
              },
              "presence_penalty": {
                "type": "number"
              },
              "previous_response_id": {
                "type": "string"
              },
              "reasoning": {
                "properties": {
                  "effort": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "service_tier": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "temperature": {
                "type": "number"
              },
              "text": {
                "properties": {
                  "format": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "tool_choice": {
                "description": "Any value"
              },
              "tools": {
                "items": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object"
                    },
                    "strict": {
                      "type": "boolean"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "top_p": {
                "type": "number"
              },
              "truncation": {
                "type": "string"
              },
              "usage": {
                "properties": {
                  "cost": {
                    "description": "Opper extension: execution cost in USD. Present on streaming response.completed events; non-stream surfaces the same value via the X-Opper-Cost header.",
                    "type": "number"
                  },
                  "input_tokens": {
                    "type": "integer"
                  },
                  "input_tokens_details": {
                    "properties": {
                      "cached_tokens": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "cached_tokens"
                    ],
                    "type": "object"
                  },
                  "output_tokens": {
                    "type": "integer"
                  },
                  "output_tokens_details": {
                    "properties": {
                      "reasoning_tokens": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "reasoning_tokens"
                    ],
                    "type": "object"
                  },
                  "total_tokens": {
                    "type": "integer"
                  }
                },
                "required": [
                  "input_tokens",
                  "output_tokens",
                  "total_tokens"
                ],
                "type": "object"
              }
            },
            "required": [
              "id",
              "object",
              "created_at",
              "completed_at",
              "status",
              "model",
              "output",
              "error",
              "incomplete_details",
              "tool_choice"
            ],
            "type": "object"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.completed"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "response"
        ],
        "title": "response.completed",
        "type": "object"
      },
      "ORStreamEventContentPartAdded": {
        "properties": {
          "content_index": {
            "type": "integer"
          },
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "part": {
            "properties": {
              "annotations": {
                "items": {
                  "description": "Any value"
                },
                "type": "array"
              },
              "refusal": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "text"
            ],
            "type": "object"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.content_part.added"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "content_index",
          "part"
        ],
        "title": "response.content_part.added",
        "type": "object"
      },
      "ORStreamEventContentPartDone": {
        "properties": {
          "content_index": {
            "type": "integer"
          },
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "part": {
            "properties": {
              "annotations": {
                "items": {
                  "description": "Any value"
                },
                "type": "array"
              },
              "refusal": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "text"
            ],
            "type": "object"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.content_part.done"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "content_index",
          "part"
        ],
        "title": "response.content_part.done",
        "type": "object"
      },
      "ORStreamEventError": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "type": "object"
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "message",
              "type"
            ],
            "type": "object"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "error"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "error"
        ],
        "title": "error",
        "type": "object"
      },
      "ORStreamEventFunctionCallArgumentsDelta": {
        "properties": {
          "delta": {
            "type": "string"
          },
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.function_call_arguments.delta"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "delta"
        ],
        "title": "response.function_call_arguments.delta",
        "type": "object"
      },
      "ORStreamEventFunctionCallArgumentsDone": {
        "properties": {
          "arguments": {
            "type": "string"
          },
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.function_call_arguments.done"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "arguments"
        ],
        "title": "response.function_call_arguments.done",
        "type": "object"
      },
      "ORStreamEventOutputItemAdded": {
        "properties": {
          "item": {
            "properties": {
              "action": {
                "type": "string"
              },
              "arguments": {
                "type": "string"
              },
              "cache_creation_tokens": {
                "type": "integer"
              },
              "cache_read_tokens": {
                "type": "integer"
              },
              "call_id": {
                "type": "string"
              },
              "content": {
                "items": {
                  "properties": {
                    "annotations": {
                      "items": {
                        "description": "Any value"
                      },
                      "type": "array"
                    },
                    "refusal": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "cost_usd": {
                "type": "number"
              },
              "encrypted_content": {
                "type": "string"
              },
              "execution_ms": {
                "type": "integer"
              },
              "findings": {
                "items": {
                  "description": "Any value"
                },
                "type": "array"
              },
              "flagged": {
                "type": "boolean"
              },
              "guard_type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "model_warnings": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "models_used": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "name": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "summary": {
                "items": {
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.output_item.added"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "output_index",
          "item"
        ],
        "title": "response.output_item.added",
        "type": "object"
      },
      "ORStreamEventOutputItemDone": {
        "properties": {
          "item": {
            "properties": {
              "action": {
                "type": "string"
              },
              "arguments": {
                "type": "string"
              },
              "cache_creation_tokens": {
                "type": "integer"
              },
              "cache_read_tokens": {
                "type": "integer"
              },
              "call_id": {
                "type": "string"
              },
              "content": {
                "items": {
                  "properties": {
                    "annotations": {
                      "items": {
                        "description": "Any value"
                      },
                      "type": "array"
                    },
                    "refusal": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "cost_usd": {
                "type": "number"
              },
              "encrypted_content": {
                "type": "string"
              },
              "execution_ms": {
                "type": "integer"
              },
              "findings": {
                "items": {
                  "description": "Any value"
                },
                "type": "array"
              },
              "flagged": {
                "type": "boolean"
              },
              "guard_type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "model_warnings": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "models_used": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "name": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "summary": {
                "items": {
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.output_item.done"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "output_index",
          "item"
        ],
        "title": "response.output_item.done",
        "type": "object"
      },
      "ORStreamEventOutputTextDelta": {
        "properties": {
          "content_index": {
            "type": "integer"
          },
          "delta": {
            "type": "string"
          },
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.output_text.delta"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "content_index",
          "delta"
        ],
        "title": "response.output_text.delta",
        "type": "object"
      },
      "ORStreamEventOutputTextDone": {
        "properties": {
          "content_index": {
            "type": "integer"
          },
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "enum": [
              "response.output_text.done"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "content_index",
          "text"
        ],
        "title": "response.output_text.done",
        "type": "object"
      },
      "ORStreamEventReasoningSummaryDelta": {
        "properties": {
          "delta": {
            "type": "string"
          },
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "summary_index": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.reasoning_summary_text.delta"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "summary_index",
          "delta"
        ],
        "title": "response.reasoning_summary_text.delta",
        "type": "object"
      },
      "ORStreamEventReasoningSummaryDone": {
        "properties": {
          "item_id": {
            "type": "string"
          },
          "output_index": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer"
          },
          "summary_index": {
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "enum": [
              "response.reasoning_summary_text.done"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "item_id",
          "output_index",
          "summary_index",
          "text"
        ],
        "title": "response.reasoning_summary_text.done",
        "type": "object"
      },
      "ORStreamEventResponseCreated": {
        "properties": {
          "response": {
            "properties": {
              "completed_at": {
                "type": "integer"
              },
              "created_at": {
                "type": "integer"
              },
              "error": {
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "details": {
                    "type": "object"
                  },
                  "message": {
                    "type": "string"
                  },
                  "param": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "message",
                  "type"
                ],
                "type": "object"
              },
              "frequency_penalty": {
                "type": "number"
              },
              "id": {
                "type": "string"
              },
              "incomplete_details": {
                "description": "Any value"
              },
              "instructions": {
                "type": "string"
              },
              "max_output_tokens": {
                "type": "integer"
              },
              "metadata": {
                "type": "object"
              },
              "model": {
                "type": "string"
              },
              "object": {
                "type": "string"
              },
              "output": {
                "items": {
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "arguments": {
                      "type": "string"
                    },
                    "cache_creation_tokens": {
                      "type": "integer"
                    },
                    "cache_read_tokens": {
                      "type": "integer"
                    },
                    "call_id": {
                      "type": "string"
                    },
                    "content": {
                      "items": {
                        "properties": {
                          "annotations": {
                            "items": {
                              "description": "Any value"
                            },
                            "type": "array"
                          },
                          "refusal": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "cost_usd": {
                      "type": "number"
                    },
                    "encrypted_content": {
                      "type": "string"
                    },
                    "execution_ms": {
                      "type": "integer"
                    },
                    "findings": {
                      "items": {
                        "description": "Any value"
                      },
                      "type": "array"
                    },
                    "flagged": {
                      "type": "boolean"
                    },
                    "guard_type": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "model_warnings": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "models_used": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "summary": {
                      "items": {
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "parallel_tool_calls": {
                "type": "boolean"
              },
              "presence_penalty": {
                "type": "number"
              },
              "previous_response_id": {
                "type": "string"
              },
              "reasoning": {
                "properties": {
                  "effort": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "service_tier": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "temperature": {
                "type": "number"
              },
              "text": {
                "properties": {
                  "format": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "tool_choice": {
                "description": "Any value"
              },
              "tools": {
                "items": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object"
                    },
                    "strict": {
                      "type": "boolean"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "top_p": {
                "type": "number"
              },
              "truncation": {
                "type": "string"
              },
              "usage": {
                "properties": {
                  "cost": {
                    "description": "Opper extension: execution cost in USD. Present on streaming response.completed events; non-stream surfaces the same value via the X-Opper-Cost header.",
                    "type": "number"
                  },
                  "input_tokens": {
                    "type": "integer"
                  },
                  "input_tokens_details": {
                    "properties": {
                      "cached_tokens": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "cached_tokens"
                    ],
                    "type": "object"
                  },
                  "output_tokens": {
                    "type": "integer"
                  },
                  "output_tokens_details": {
                    "properties": {
                      "reasoning_tokens": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "reasoning_tokens"
                    ],
                    "type": "object"
                  },
                  "total_tokens": {
                    "type": "integer"
                  }
                },
                "required": [
                  "input_tokens",
                  "output_tokens",
                  "total_tokens"
                ],
                "type": "object"
              }
            },
            "required": [
              "id",
              "object",
              "created_at",
              "completed_at",
              "status",
              "model",
              "output",
              "error",
              "incomplete_details",
              "tool_choice"
            ],
            "type": "object"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.created"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "response"
        ],
        "title": "response.created",
        "type": "object"
      },
      "ORStreamEventResponseInProgress": {
        "properties": {
          "response": {
            "properties": {
              "completed_at": {
                "type": "integer"
              },
              "created_at": {
                "type": "integer"
              },
              "error": {
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "details": {
                    "type": "object"
                  },
                  "message": {
                    "type": "string"
                  },
                  "param": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "message",
                  "type"
                ],
                "type": "object"
              },
              "frequency_penalty": {
                "type": "number"
              },
              "id": {
                "type": "string"
              },
              "incomplete_details": {
                "description": "Any value"
              },
              "instructions": {
                "type": "string"
              },
              "max_output_tokens": {
                "type": "integer"
              },
              "metadata": {
                "type": "object"
              },
              "model": {
                "type": "string"
              },
              "object": {
                "type": "string"
              },
              "output": {
                "items": {
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "arguments": {
                      "type": "string"
                    },
                    "cache_creation_tokens": {
                      "type": "integer"
                    },
                    "cache_read_tokens": {
                      "type": "integer"
                    },
                    "call_id": {
                      "type": "string"
                    },
                    "content": {
                      "items": {
                        "properties": {
                          "annotations": {
                            "items": {
                              "description": "Any value"
                            },
                            "type": "array"
                          },
                          "refusal": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "cost_usd": {
                      "type": "number"
                    },
                    "encrypted_content": {
                      "type": "string"
                    },
                    "execution_ms": {
                      "type": "integer"
                    },
                    "findings": {
                      "items": {
                        "description": "Any value"
                      },
                      "type": "array"
                    },
                    "flagged": {
                      "type": "boolean"
                    },
                    "guard_type": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "model_warnings": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "models_used": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "summary": {
                      "items": {
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "parallel_tool_calls": {
                "type": "boolean"
              },
              "presence_penalty": {
                "type": "number"
              },
              "previous_response_id": {
                "type": "string"
              },
              "reasoning": {
                "properties": {
                  "effort": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "service_tier": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "temperature": {
                "type": "number"
              },
              "text": {
                "properties": {
                  "format": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "tool_choice": {
                "description": "Any value"
              },
              "tools": {
                "items": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object"
                    },
                    "strict": {
                      "type": "boolean"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "top_p": {
                "type": "number"
              },
              "truncation": {
                "type": "string"
              },
              "usage": {
                "properties": {
                  "cost": {
                    "description": "Opper extension: execution cost in USD. Present on streaming response.completed events; non-stream surfaces the same value via the X-Opper-Cost header.",
                    "type": "number"
                  },
                  "input_tokens": {
                    "type": "integer"
                  },
                  "input_tokens_details": {
                    "properties": {
                      "cached_tokens": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "cached_tokens"
                    ],
                    "type": "object"
                  },
                  "output_tokens": {
                    "type": "integer"
                  },
                  "output_tokens_details": {
                    "properties": {
                      "reasoning_tokens": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "reasoning_tokens"
                    ],
                    "type": "object"
                  },
                  "total_tokens": {
                    "type": "integer"
                  }
                },
                "required": [
                  "input_tokens",
                  "output_tokens",
                  "total_tokens"
                ],
                "type": "object"
              }
            },
            "required": [
              "id",
              "object",
              "created_at",
              "completed_at",
              "status",
              "model",
              "output",
              "error",
              "incomplete_details",
              "tool_choice"
            ],
            "type": "object"
          },
          "sequence_number": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "response.in_progress"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "response"
        ],
        "title": "response.in_progress",
        "type": "object"
      },
      "ORSummaryText": {
        "properties": {
          "text": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "type": "object"
      },
      "ORTextConfig": {
        "properties": {
          "format": {
            "properties": {
              "name": {
                "type": "string"
              },
              "schema": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "ORTextFormat": {
        "properties": {
          "name": {
            "type": "string"
          },
          "schema": {
            "type": "object"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ORToolDef": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          },
          "strict": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ORUsage": {
        "properties": {
          "cost": {
            "description": "Opper extension: execution cost in USD. Present on streaming response.completed events; non-stream surfaces the same value via the X-Opper-Cost header.",
            "type": "number"
          },
          "input_tokens": {
            "type": "integer"
          },
          "input_tokens_details": {
            "properties": {
              "cached_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "cached_tokens"
            ],
            "type": "object"
          },
          "output_tokens": {
            "type": "integer"
          },
          "output_tokens_details": {
            "properties": {
              "reasoning_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "reasoning_tokens"
            ],
            "type": "object"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "total_tokens"
        ],
        "type": "object"
      },
      "OpenAICompatModel": {
        "properties": {
          "architecture": {
            "properties": {
              "input_modalities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "modality": {
                "type": "string"
              },
              "output_modalities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "modality",
              "input_modalities",
              "output_modalities"
            ],
            "type": "object"
          },
          "context_length": {
            "type": "integer"
          },
          "created": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "opper": {
            "properties": {
              "capabilities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "country": {
                "deprecated": true,
                "description": "Deprecated: read compliance.inference_location on /v3/models. The English name of that location when it is one country (SE reads Sweden); absent otherwise.",
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "gdpr_residency": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "maker": {
                "type": "string"
              },
              "maker_country": {
                "type": "string"
              },
              "max_output_tokens": {
                "type": "integer"
              },
              "members": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "pricing": {
                "properties": {
                  "kind": {
                    "enum": [
                      "variable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "kind"
                ],
                "type": "object"
              },
              "reasoning": {
                "properties": {
                  "default": {
                    "type": "string"
                  },
                  "supported": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "supported"
                ],
                "type": "object"
              },
              "region": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "verification": {
                "type": "string"
              },
              "version": {
                "type": "integer"
              },
              "zdr": {
                "properties": {
                  "caching": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "logging": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "moderation": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subprocessors": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "training": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "logging",
                  "moderation",
                  "caching",
                  "training",
                  "subprocessors"
                ],
                "type": "object"
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          "owned_by": {
            "type": "string"
          },
          "pricing": {
            "properties": {
              "completion": {
                "type": "string"
              },
              "input_cache_read": {
                "type": "string"
              },
              "input_cache_write": {
                "type": "string"
              },
              "input_cache_write_12h": {
                "type": "string"
              },
              "input_cache_write_1h": {
                "type": "string"
              },
              "internal_reasoning": {
                "type": "string"
              },
              "prompt": {
                "type": "string"
              },
              "web_search": {
                "type": "string"
              }
            },
            "required": [
              "prompt",
              "completion"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "owned_by"
        ],
        "type": "object"
      },
      "OpenAICompatModelsListResponse": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "architecture": {
                  "properties": {
                    "input_modalities": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "modality": {
                      "type": "string"
                    },
                    "output_modalities": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "modality",
                    "input_modalities",
                    "output_modalities"
                  ],
                  "type": "object"
                },
                "context_length": {
                  "type": "integer"
                },
                "created": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "object": {
                  "type": "string"
                },
                "opper": {
                  "properties": {
                    "capabilities": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "country": {
                      "deprecated": true,
                      "description": "Deprecated: read compliance.inference_location on /v3/models. The English name of that location when it is one country (SE reads Sweden); absent otherwise.",
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "gdpr_residency": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "maker": {
                      "type": "string"
                    },
                    "maker_country": {
                      "type": "string"
                    },
                    "max_output_tokens": {
                      "type": "integer"
                    },
                    "members": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "pricing": {
                      "properties": {
                        "kind": {
                          "enum": [
                            "variable"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "type": "object"
                    },
                    "reasoning": {
                      "properties": {
                        "default": {
                          "type": "string"
                        },
                        "supported": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "supported"
                      ],
                      "type": "object"
                    },
                    "region": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "verification": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer"
                    },
                    "zdr": {
                      "properties": {
                        "caching": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "logging": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "moderation": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "subprocessors": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "training": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "logging",
                        "moderation",
                        "caching",
                        "training",
                        "subprocessors"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "type": "object"
                },
                "owned_by": {
                  "type": "string"
                },
                "pricing": {
                  "properties": {
                    "completion": {
                      "type": "string"
                    },
                    "input_cache_read": {
                      "type": "string"
                    },
                    "input_cache_write": {
                      "type": "string"
                    },
                    "input_cache_write_12h": {
                      "type": "string"
                    },
                    "input_cache_write_1h": {
                      "type": "string"
                    },
                    "internal_reasoning": {
                      "type": "string"
                    },
                    "prompt": {
                      "type": "string"
                    },
                    "web_search": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "prompt",
                    "completion"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "id",
                "object",
                "created",
                "owned_by"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "object": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "data"
        ],
        "type": "object"
      },
      "OpenAITranscriptionRequest": {
        "properties": {
          "chunking_strategy": {
            "description": "Any value"
          },
          "input_audio": {
            "properties": {
              "data": {
                "type": "string"
              },
              "format": {
                "type": "string"
              }
            },
            "required": [
              "data",
              "format"
            ],
            "type": "object"
          },
          "language": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "response_format": {
            "type": "string"
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "timestamp_granularities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "model",
          "input_audio"
        ],
        "type": "object"
      },
      "ProviderInfo": {
        "properties": {
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "logo": {
            "properties": {
              "dark": {
                "type": "string"
              },
              "light": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "model_count": {
            "type": "integer"
          },
          "owner_country": {
            "type": "string"
          },
          "previous_slugs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "regions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "service_routes": {
            "items": {
              "properties": {
                "access": {
                  "type": "string"
                },
                "country": {
                  "deprecated": true,
                  "description": "Deprecated: read inference_location. The English name of inference_location when that is one country (SE reads Sweden); absent otherwise.",
                  "type": "string"
                },
                "data_handling": {
                  "properties": {
                    "caching": {
                      "properties": {
                        "default": {
                          "type": "string"
                        },
                        "scope": {
                          "type": "string"
                        },
                        "storage_location": {
                          "type": "string"
                        },
                        "ttl_seconds": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "default"
                      ],
                      "type": "object"
                    },
                    "logging": {
                      "properties": {
                        "default": {
                          "type": "string"
                        },
                        "human_review": {
                          "type": "string"
                        },
                        "retention_days": {
                          "type": "integer"
                        },
                        "storage_location": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "default",
                        "retention_days"
                      ],
                      "type": "object"
                    },
                    "moderation": {
                      "properties": {
                        "default": {
                          "type": "string"
                        },
                        "human_review": {
                          "type": "string"
                        },
                        "retention_days": {
                          "type": "integer"
                        },
                        "storage_location": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "default",
                        "retention_days"
                      ],
                      "type": "object"
                    },
                    "residency_enforced": {
                      "type": "boolean"
                    },
                    "subprocessors_read_content": {
                      "type": "boolean"
                    },
                    "training": {
                      "properties": {
                        "default": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "default"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "training",
                    "logging",
                    "moderation",
                    "caching"
                  ],
                  "type": "object"
                },
                "gdpr": {
                  "properties": {
                    "dpa_available": {
                      "type": "boolean"
                    },
                    "residency": {
                      "type": "string"
                    },
                    "transfer_mechanism": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "residency",
                    "transfer_mechanism"
                  ],
                  "type": "object"
                },
                "id": {
                  "type": "string"
                },
                "inference_location": {
                  "type": "string"
                },
                "last_verified_at": {
                  "type": "string"
                },
                "name": {
                  "description": "What to show a person for this service route. It can change; use id to tell routes apart. Absent while a route has no name.",
                  "type": "string"
                },
                "native_region": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "provider_display_name": {
                  "type": "string"
                },
                "region": {
                  "description": "The residency bucket of inference_location: EU for an EU member state or the EU area",
                  "type": "string"
                },
                "sources": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "underlying_maker": {
                  "type": "string"
                },
                "uuid": {
                  "description": "A second identifier for the service route that never changes. An opaque value: compare it and do not parse it.",
                  "type": "string"
                },
                "verification": {
                  "properties": {
                    "attested_at": {
                      "type": "string"
                    },
                    "opper_verified_at": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "verified_by": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                },
                "zdr": {
                  "properties": {
                    "caching": {
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "logging": {
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "moderation": {
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subprocessors": {
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "training": {
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "logging",
                    "moderation",
                    "caching",
                    "training",
                    "subprocessors"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "id"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "website": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "previous_slugs",
          "display_name",
          "status",
          "regions",
          "service_routes",
          "model_count"
        ],
        "type": "object"
      },
      "PublicUnavailableModel": {
        "properties": {
          "availability": {
            "type": "string"
          },
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "context_window": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "featured": {
            "type": "boolean"
          },
          "input_modalities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "long_description": {
            "type": "string"
          },
          "maker": {
            "properties": {
              "country": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "slug",
              "display_name"
            ],
            "type": "object"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "output_modalities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "references": {
            "items": {
              "properties": {
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "updated_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "release": {
            "properties": {
              "date": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "date",
              "source"
            ],
            "type": "object"
          },
          "short_description": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "name",
          "type",
          "capabilities",
          "availability",
          "maker"
        ],
        "type": "object"
      },
      "RealtimeSessionRequest": {
        "properties": {
          "config": {
            "properties": {
              "diarize": {
                "type": "boolean"
              },
              "input_audio_format": {
                "description": "Audio the client sends: `pcm16` (default) or, where the model's `params.realtime.input_audio_formats` lists them, `g711_ulaw` / `g711_alaw` (8 kHz phone audio). session.started reports the input sample rate.",
                "type": "string"
              },
              "input_transcription": {
                "type": "boolean"
              },
              "input_transcription_model": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "modalities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "model": {
                "type": "string"
              },
              "output_audio_format": {
                "type": "string"
              },
              "output_transcription": {
                "type": "boolean"
              },
              "parameters": {
                "description": "Provider settings for the session, e.g. Reson8's max_speakers or eager_turn_probability. The keys each model takes are listed with descriptions in its `params.realtime.parameters` (GET /v3/models?type=realtime); a key the model does not take fails session.start.",
                "type": "object"
              },
              "reasoning_effort": {
                "type": "string"
              },
              "temperature": {
                "type": "number"
              },
              "tools": {
                "items": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "transcription_custom_vocabulary": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "transcription_language_codes": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "transcription_mode": {
                "type": "string"
              },
              "translation_echo_target_language": {
                "type": "boolean"
              },
              "translation_target_language": {
                "type": "string"
              },
              "turn_detection": {
                "properties": {
                  "eagerness": {
                    "type": "string"
                  },
                  "prefix_padding_ms": {
                    "type": "integer"
                  },
                  "silence_duration_ms": {
                    "type": "integer"
                  },
                  "threshold": {
                    "type": "number"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              },
              "voice": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "locked_fields": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "ttl_seconds": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RealtimeSessionResponse": {
        "properties": {
          "client_secret": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "ws_url": {
            "type": "string"
          }
        },
        "required": [
          "client_secret",
          "expires_at"
        ],
        "type": "object"
      },
      "ReasoningConfig": {
        "properties": {
          "effort": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReplaceManagementProjectAccessPolicyRequest": {
        "additionalProperties": false,
        "properties": {
          "expected_change_token": {
            "pattern": "^pav1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "mode": {
            "enum": [
              "organization",
              "restricted"
            ],
            "type": "string"
          },
          "role_keys": {
            "items": {
              "type": "string"
            },
            "maxItems": 500,
            "type": "array"
          },
          "user_uuids": {
            "items": {
              "type": "string"
            },
            "maxItems": 500,
            "type": "array"
          }
        },
        "required": [
          "mode",
          "role_keys",
          "user_uuids",
          "expected_change_token"
        ],
        "type": "object"
      },
      "RerankDocument": {
        "properties": {
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "RerankRequest": {
        "properties": {
          "documents": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "model": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "return_documents": {
            "type": "boolean"
          },
          "top_k": {
            "description": "Compatibility alias for top_n. Zero means unspecified. Positive values must match top_n when both are supplied.",
            "minimum": 0,
            "type": "integer"
          },
          "top_n": {
            "description": "Maximum number of results. Omit to return all documents.",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "model",
          "query",
          "documents"
        ],
        "type": "object"
      },
      "RerankResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "results": {
            "items": {
              "properties": {
                "document": {
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "type": "object"
                },
                "index": {
                  "type": "integer"
                },
                "relevance_score": {
                  "type": "number"
                }
              },
              "required": [
                "index",
                "relevance_score"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "usage": {
            "properties": {
              "cost": {
                "type": "number"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "total_tokens",
              "cost"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "model",
          "results",
          "usage"
        ],
        "type": "object"
      },
      "RerankResult": {
        "properties": {
          "document": {
            "properties": {
              "text": {
                "type": "string"
              }
            },
            "required": [
              "text"
            ],
            "type": "object"
          },
          "index": {
            "type": "integer"
          },
          "relevance_score": {
            "type": "number"
          }
        },
        "required": [
          "index",
          "relevance_score"
        ],
        "type": "object"
      },
      "RerankUsage": {
        "properties": {
          "cost": {
            "type": "number"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "total_tokens",
          "cost"
        ],
        "type": "object"
      },
      "ResponsesError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "details": {
            "description": "Machine-readable context for the error, when there is any. Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
            "type": "object"
          },
          "message": {
            "type": "string"
          },
          "param": {
            "description": "Any value"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "ResponsesOutputContent": {
        "properties": {
          "annotations": {
            "items": {
              "description": "Any value"
            },
            "type": "array"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "type": "object"
      },
      "ResponsesOutputItem": {
        "properties": {
          "arguments": {
            "type": "string"
          },
          "call_id": {
            "type": "string"
          },
          "content": {
            "items": {
              "properties": {
                "annotations": {
                  "items": {
                    "description": "Any value"
                  },
                  "type": "array"
                },
                "text": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "text"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "encrypted_content": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "summary": {
            "items": {
              "properties": {
                "text": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "text"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ResponsesRequest": {
        "properties": {
          "background": {
            "description": "Run the response in the background: the call answers at once with a queued response and the model completes it later. Supported with background_options.completion_window 2h or 8h on models that have a background window endpoint (GET /v3/models?service_tier=background_2h lists them). Read the response with GET /v3/compat/responses/{id}; stop it with POST /v3/compat/responses/{id}/cancel. Not allowed with stream; a models fallback list; a dynamic route; opper: tools; custom_model_credentials or a project with output guardrails.",
            "type": "boolean"
          },
          "background_options": {
            "properties": {
              "completion_window": {
                "description": "How soon the response must complete. The provider targets completion within the window and the request is billed at the window's discounted price: 2h or 8h. Requires background: true.",
                "enum": [
                  "2h",
                  "8h"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "cache_control": {
            "description": "Opt in to automatic prompt caching for Anthropic-family models: {\"type\":\"ephemeral\"} (optionally \"ttl\":\"1h\"). Places one moving cache breakpoint on the largest cacheable prefix. Caching is off unless set; no-op on providers with automatic server-side caching (OpenAI",
            "type": "object"
          },
          "frequency_penalty": {
            "type": "number"
          },
          "include": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "input": {
            "properties": {
              "Items": {
                "items": {
                  "properties": {
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "Text": {
                "type": "string"
              }
            },
            "required": [
              "Text",
              "Items"
            ],
            "type": "object"
          },
          "instructions": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "metadata": {
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "models": {
            "description": "Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in model and the rest here; or omit model and the first entry is the primary. Each entry is any model string: a bare pooled name; a provider/model id; an org alias. Not allowed together with a dynamic/\u003cname\u003e route. At most 10 entries. Which model answered is in the X-Opper-Served-Model header; the model field still echoes what you sent.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "presence_penalty": {
            "type": "number"
          },
          "previous_response_id": {
            "type": "string"
          },
          "prompt_cache_key": {
            "description": "OpenAI cache-routing key: a stable name for the prompt prefix this request shares with others. Forwarded to OpenAI and used to keep requests that share the key on the same cache replica at providers with per-replica prompt caches.",
            "type": "string"
          },
          "reasoning": {
            "properties": {
              "effort": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "service_tier": {
            "description": "Processing tier. flex: discounted and slower; when the provider has no flex capacity the call fails with 429 instead of running at the full price. priority (alias fast): faster at a premium; falls back to the default tier. ultrafast: fastest; falls back to priority then default. economy: the same model cheaper and slower where a provider sells it under its own model id; it never falls back to the default tier. default and auto: the provider default. A model without an endpoint for the requested tier runs at the default tier. The tier that ran is in the X-Opper-Served-Service-Tier header.",
            "type": "string"
          },
          "store": {
            "type": "boolean"
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "text": {
            "properties": {
              "format": {
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "object"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "tool_choice": {
            "description": "Any value"
          },
          "tools": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "name": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object"
                },
                "require_approval": {
                  "type": "string"
                },
                "server_label": {
                  "type": "string"
                },
                "server_url": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "top_p": {
            "type": "number"
          },
          "truncation": {
            "type": "string"
          },
          "user": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResponsesResponse": {
        "properties": {
          "completed_at": {
            "type": "integer"
          },
          "cost": {
            "type": "number"
          },
          "created_at": {
            "type": "number"
          },
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "type": "object"
              },
              "message": {
                "type": "string"
              },
              "param": {
                "description": "Any value"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "frequency_penalty": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "incomplete_details": {
            "description": "Any value"
          },
          "instructions": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "metadata": {
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "output": {
            "items": {
              "properties": {
                "arguments": {
                  "type": "string"
                },
                "call_id": {
                  "type": "string"
                },
                "content": {
                  "items": {
                    "properties": {
                      "annotations": {
                        "items": {
                          "description": "Any value"
                        },
                        "type": "array"
                      },
                      "text": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "text"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "encrypted_content": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "summary": {
                  "items": {
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "text"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "output_text": {
            "type": "string"
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "presence_penalty": {
            "type": "number"
          },
          "previous_response_id": {
            "type": "string"
          },
          "reasoning": {
            "properties": {
              "effort": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "service_tier": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "temperature": {
            "type": "number"
          },
          "text": {
            "properties": {
              "format": {
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "object"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "tool_choice": {
            "description": "Any value"
          },
          "tools": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "name": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object"
                },
                "require_approval": {
                  "type": "string"
                },
                "server_label": {
                  "type": "string"
                },
                "server_url": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "top_p": {
            "type": "number"
          },
          "truncation": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "cost": {
                "type": "number"
              },
              "input_tokens": {
                "type": "integer"
              },
              "input_tokens_details": {
                "properties": {
                  "cached_tokens": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "output_tokens": {
                "type": "integer"
              },
              "output_tokens_details": {
                "properties": {
                  "reasoning_tokens": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "required": [
              "input_tokens",
              "output_tokens",
              "total_tokens"
            ],
            "type": "object"
          },
          "user": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "model",
          "status",
          "output",
          "error",
          "incomplete_details",
          "tool_choice"
        ],
        "type": "object"
      },
      "ResponsesTool": {
        "properties": {
          "description": {
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          },
          "require_approval": {
            "type": "string"
          },
          "server_label": {
            "type": "string"
          },
          "server_url": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ResponsesUsage": {
        "properties": {
          "cost": {
            "type": "number"
          },
          "input_tokens": {
            "type": "integer"
          },
          "input_tokens_details": {
            "properties": {
              "cached_tokens": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "output_tokens": {
            "type": "integer"
          },
          "output_tokens_details": {
            "properties": {
              "reasoning_tokens": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "total_tokens"
        ],
        "type": "object"
      },
      "RoundtableModelResult": {
        "properties": {
          "cost": {
            "description": "USD cost for this model call summed across retries.",
            "type": "number"
          },
          "data": {
            "description": "Raw model output. When output_schema is supplied this is a JSON string that validated against the schema.",
            "type": "string"
          },
          "duration_ms": {
            "description": "Wall-clock time for this model call in milliseconds including retries.",
            "type": "integer"
          },
          "error": {
            "description": "Provider or transport error message. Empty on success.",
            "type": "string"
          },
          "index": {
            "description": "Position of this model in the request's models array (0-based).",
            "type": "integer"
          },
          "model": {
            "description": "Name of the model that produced this result.",
            "type": "string"
          },
          "schema_error": {
            "description": "Why the output failed schema validation. Empty when schema_valid is true or absent.",
            "type": "string"
          },
          "schema_valid": {
            "description": "Whether the model's output validated against the request's output_schema. Absent when no output_schema was supplied.",
            "type": "boolean"
          },
          "usage": {
            "description": "Token counts aggregated across all retry attempts.",
            "properties": {
              "cache_creation_12h_tokens": {
                "type": "integer"
              },
              "cache_creation_1h_tokens": {
                "type": "integer"
              },
              "cache_creation_tokens": {
                "type": "integer"
              },
              "cache_read_tokens": {
                "type": "integer"
              },
              "code_interpreter_sessions": {
                "type": "integer"
              },
              "extra": {
                "type": "object"
              },
              "file_search_calls": {
                "type": "integer"
              },
              "google_search_prompts": {
                "type": "integer"
              },
              "google_search_queries": {
                "type": "integer"
              },
              "image_generation_calls": {
                "type": "integer"
              },
              "input_audio_seconds": {
                "type": "number"
              },
              "input_audio_tokens": {
                "type": "integer"
              },
              "input_image_tokens": {
                "type": "integer"
              },
              "input_tokens": {
                "type": "integer"
              },
              "output_audio_tokens": {
                "type": "integer"
              },
              "output_image_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              },
              "provider_reported_cost": {
                "type": "number"
              },
              "reasoning_tokens": {
                "type": "integer"
              },
              "service_tier": {
                "type": "string"
              },
              "url_context_requests": {
                "type": "integer"
              },
              "web_fetch_requests": {
                "type": "integer"
              },
              "web_search_calls": {
                "type": "integer"
              },
              "web_search_requests": {
                "type": "integer"
              },
              "x_search_calls": {
                "type": "integer"
              }
            },
            "required": [
              "input_tokens",
              "output_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "index",
          "model",
          "data",
          "duration_ms"
        ],
        "type": "object"
      },
      "RoundtableModelSpec": {
        "properties": {
          "max_tokens": {
            "description": "Override max output tokens for this model. Falls back to the model's configured default or 8192 when unspecified.",
            "type": "integer"
          },
          "name": {
            "description": "Model identifier (e.g. gpt-4o or anthropic/claude-sonnet-4-20250514)",
            "type": "string"
          },
          "reasoning": {
            "description": "Reasoning effort: low/medium/high/max",
            "type": "string"
          },
          "temperature": {
            "description": "Override temperature for this model (0.0-2.0)",
            "type": "number"
          },
          "top_p": {
            "description": "Override top_p for this model",
            "type": "number"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "RoundtableRequest": {
        "properties": {
          "choices": {
            "description": "Literal options for multiple_choice resolution",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "input": {
            "description": "The question or prompt sent to all models",
            "type": "string"
          },
          "instructions": {
            "description": "System prompt shared across all model calls",
            "type": "string"
          },
          "max_retries": {
            "description": "Per-model retry count on transient errors (default 1 / max 3)",
            "type": "integer"
          },
          "models": {
            "description": "Models to query in parallel",
            "items": {
              "properties": {
                "max_tokens": {
                  "description": "Override max output tokens for this model. Falls back to the model's configured default or 8192 when unspecified.",
                  "type": "integer"
                },
                "name": {
                  "description": "Model identifier (e.g. gpt-4o or anthropic/claude-sonnet-4-20250514)",
                  "type": "string"
                },
                "reasoning": {
                  "description": "Reasoning effort: low/medium/high/max",
                  "type": "string"
                },
                "temperature": {
                  "description": "Override temperature for this model (0.0-2.0)",
                  "type": "number"
                },
                "top_p": {
                  "description": "Override top_p for this model",
                  "type": "number"
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "output_schema": {
            "description": "JSON Schema for structured output — applied to all model calls and the consolidation call",
            "type": "object"
          },
          "resolution": {
            "description": "Resolution mode: summary (default) / fast / multiple_choice",
            "type": "string"
          },
          "stream": {
            "description": "Enable SSE streaming",
            "type": "boolean"
          },
          "summary_model": {
            "description": "Override the model used for consolidation in summary mode",
            "type": "string"
          },
          "timeout_ms": {
            "description": "Per-model timeout in milliseconds covering all retries (default 120000 / max 300000)",
            "type": "integer"
          }
        },
        "required": [
          "input",
          "models"
        ],
        "type": "object"
      },
      "RoundtableResponse": {
        "properties": {
          "data": {
            "description": "Final consolidated output. Null in fast mode (no consolidation runs).",
            "type": "string"
          },
          "id": {
            "description": "Stable identifier for this roundtable call.",
            "type": "string"
          },
          "meta": {
            "description": "Aggregated call metadata.",
            "properties": {
              "models_used": {
                "description": "Names of the models queried in parallel.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "resolution": {
                "description": "Resolution mode that produced this response (summary / fast / multiple_choice).",
                "type": "string"
              },
              "summary_model": {
                "description": "Model used for the consolidation call. Only set in summary mode.",
                "type": "string"
              },
              "summary_usage": {
                "description": "Token counts for the consolidation call aggregated across retries.",
                "properties": {
                  "cache_creation_12h_tokens": {
                    "type": "integer"
                  },
                  "cache_creation_1h_tokens": {
                    "type": "integer"
                  },
                  "cache_creation_tokens": {
                    "type": "integer"
                  },
                  "cache_read_tokens": {
                    "type": "integer"
                  },
                  "code_interpreter_sessions": {
                    "type": "integer"
                  },
                  "extra": {
                    "type": "object"
                  },
                  "file_search_calls": {
                    "type": "integer"
                  },
                  "google_search_prompts": {
                    "type": "integer"
                  },
                  "google_search_queries": {
                    "type": "integer"
                  },
                  "image_generation_calls": {
                    "type": "integer"
                  },
                  "input_audio_seconds": {
                    "type": "number"
                  },
                  "input_audio_tokens": {
                    "type": "integer"
                  },
                  "input_image_tokens": {
                    "type": "integer"
                  },
                  "input_tokens": {
                    "type": "integer"
                  },
                  "output_audio_tokens": {
                    "type": "integer"
                  },
                  "output_image_tokens": {
                    "type": "integer"
                  },
                  "output_tokens": {
                    "type": "integer"
                  },
                  "provider_reported_cost": {
                    "type": "number"
                  },
                  "reasoning_tokens": {
                    "type": "integer"
                  },
                  "service_tier": {
                    "type": "string"
                  },
                  "url_context_requests": {
                    "type": "integer"
                  },
                  "web_fetch_requests": {
                    "type": "integer"
                  },
                  "web_search_calls": {
                    "type": "integer"
                  },
                  "web_search_requests": {
                    "type": "integer"
                  },
                  "x_search_calls": {
                    "type": "integer"
                  }
                },
                "required": [
                  "input_tokens",
                  "output_tokens"
                ],
                "type": "object"
              },
              "total_cost": {
                "description": "USD cost summed across all fan-out models and the consolidation call.",
                "type": "number"
              },
              "total_duration_ms": {
                "description": "End-to-end request duration in milliseconds.",
                "type": "integer"
              },
              "trace_uuid": {
                "description": "UUID of the trace span for this roundtable call.",
                "type": "string"
              }
            },
            "required": [
              "resolution",
              "models_used",
              "total_cost",
              "total_duration_ms"
            ],
            "type": "object"
          },
          "model_results": {
            "description": "Per-model fan-out results in the order they appeared in the request.",
            "items": {
              "properties": {
                "cost": {
                  "description": "USD cost for this model call summed across retries.",
                  "type": "number"
                },
                "data": {
                  "description": "Raw model output. When output_schema is supplied this is a JSON string that validated against the schema.",
                  "type": "string"
                },
                "duration_ms": {
                  "description": "Wall-clock time for this model call in milliseconds including retries.",
                  "type": "integer"
                },
                "error": {
                  "description": "Provider or transport error message. Empty on success.",
                  "type": "string"
                },
                "index": {
                  "description": "Position of this model in the request's models array (0-based).",
                  "type": "integer"
                },
                "model": {
                  "description": "Name of the model that produced this result.",
                  "type": "string"
                },
                "schema_error": {
                  "description": "Why the output failed schema validation. Empty when schema_valid is true or absent.",
                  "type": "string"
                },
                "schema_valid": {
                  "description": "Whether the model's output validated against the request's output_schema. Absent when no output_schema was supplied.",
                  "type": "boolean"
                },
                "usage": {
                  "description": "Token counts aggregated across all retry attempts.",
                  "properties": {
                    "cache_creation_12h_tokens": {
                      "type": "integer"
                    },
                    "cache_creation_1h_tokens": {
                      "type": "integer"
                    },
                    "cache_creation_tokens": {
                      "type": "integer"
                    },
                    "cache_read_tokens": {
                      "type": "integer"
                    },
                    "code_interpreter_sessions": {
                      "type": "integer"
                    },
                    "extra": {
                      "type": "object"
                    },
                    "file_search_calls": {
                      "type": "integer"
                    },
                    "google_search_prompts": {
                      "type": "integer"
                    },
                    "google_search_queries": {
                      "type": "integer"
                    },
                    "image_generation_calls": {
                      "type": "integer"
                    },
                    "input_audio_seconds": {
                      "type": "number"
                    },
                    "input_audio_tokens": {
                      "type": "integer"
                    },
                    "input_image_tokens": {
                      "type": "integer"
                    },
                    "input_tokens": {
                      "type": "integer"
                    },
                    "output_audio_tokens": {
                      "type": "integer"
                    },
                    "output_image_tokens": {
                      "type": "integer"
                    },
                    "output_tokens": {
                      "type": "integer"
                    },
                    "provider_reported_cost": {
                      "type": "number"
                    },
                    "reasoning_tokens": {
                      "type": "integer"
                    },
                    "service_tier": {
                      "type": "string"
                    },
                    "url_context_requests": {
                      "type": "integer"
                    },
                    "web_fetch_requests": {
                      "type": "integer"
                    },
                    "web_search_calls": {
                      "type": "integer"
                    },
                    "web_search_requests": {
                      "type": "integer"
                    },
                    "x_search_calls": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "input_tokens",
                    "output_tokens"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "index",
                "model",
                "data",
                "duration_ms"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "data",
          "meta",
          "model_results"
        ],
        "type": "object"
      },
      "RoundtableResponseMeta": {
        "properties": {
          "models_used": {
            "description": "Names of the models queried in parallel.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "resolution": {
            "description": "Resolution mode that produced this response (summary / fast / multiple_choice).",
            "type": "string"
          },
          "summary_model": {
            "description": "Model used for the consolidation call. Only set in summary mode.",
            "type": "string"
          },
          "summary_usage": {
            "description": "Token counts for the consolidation call aggregated across retries.",
            "properties": {
              "cache_creation_12h_tokens": {
                "type": "integer"
              },
              "cache_creation_1h_tokens": {
                "type": "integer"
              },
              "cache_creation_tokens": {
                "type": "integer"
              },
              "cache_read_tokens": {
                "type": "integer"
              },
              "code_interpreter_sessions": {
                "type": "integer"
              },
              "extra": {
                "type": "object"
              },
              "file_search_calls": {
                "type": "integer"
              },
              "google_search_prompts": {
                "type": "integer"
              },
              "google_search_queries": {
                "type": "integer"
              },
              "image_generation_calls": {
                "type": "integer"
              },
              "input_audio_seconds": {
                "type": "number"
              },
              "input_audio_tokens": {
                "type": "integer"
              },
              "input_image_tokens": {
                "type": "integer"
              },
              "input_tokens": {
                "type": "integer"
              },
              "output_audio_tokens": {
                "type": "integer"
              },
              "output_image_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              },
              "provider_reported_cost": {
                "type": "number"
              },
              "reasoning_tokens": {
                "type": "integer"
              },
              "service_tier": {
                "type": "string"
              },
              "url_context_requests": {
                "type": "integer"
              },
              "web_fetch_requests": {
                "type": "integer"
              },
              "web_search_calls": {
                "type": "integer"
              },
              "web_search_requests": {
                "type": "integer"
              },
              "x_search_calls": {
                "type": "integer"
              }
            },
            "required": [
              "input_tokens",
              "output_tokens"
            ],
            "type": "object"
          },
          "total_cost": {
            "description": "USD cost summed across all fan-out models and the consolidation call.",
            "type": "number"
          },
          "total_duration_ms": {
            "description": "End-to-end request duration in milliseconds.",
            "type": "integer"
          },
          "trace_uuid": {
            "description": "UUID of the trace span for this roundtable call.",
            "type": "string"
          }
        },
        "required": [
          "resolution",
          "models_used",
          "total_cost",
          "total_duration_ms"
        ],
        "type": "object"
      },
      "RoundtableStreamChunk": {
        "properties": {
          "code": {
            "description": "Error code on an error event (model_allowlist_blocked",
            "type": "string"
          },
          "cost": {
            "description": "USD cost for the model that just completed (on model_done / resolution_done).",
            "type": "number"
          },
          "data": {
            "description": "Full accumulated content on model_done and resolution_done events.",
            "type": "string"
          },
          "delta": {
            "description": "Incremental text payload on model_delta and resolution_delta events.",
            "type": "string"
          },
          "details": {
            "description": "On an error event for models every one of which was refused: the same details the synchronous 403 carries (reason",
            "type": "object"
          },
          "error": {
            "description": "Error message for this event.",
            "type": "string"
          },
          "meta": {
            "description": "Aggregated response meta. Only set on the final done event.",
            "properties": {
              "models_used": {
                "description": "Names of the models queried in parallel.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "resolution": {
                "description": "Resolution mode that produced this response (summary / fast / multiple_choice).",
                "type": "string"
              },
              "summary_model": {
                "description": "Model used for the consolidation call. Only set in summary mode.",
                "type": "string"
              },
              "summary_usage": {
                "description": "Token counts for the consolidation call aggregated across retries.",
                "properties": {
                  "cache_creation_12h_tokens": {
                    "type": "integer"
                  },
                  "cache_creation_1h_tokens": {
                    "type": "integer"
                  },
                  "cache_creation_tokens": {
                    "type": "integer"
                  },
                  "cache_read_tokens": {
                    "type": "integer"
                  },
                  "code_interpreter_sessions": {
                    "type": "integer"
                  },
                  "extra": {
                    "type": "object"
                  },
                  "file_search_calls": {
                    "type": "integer"
                  },
                  "google_search_prompts": {
                    "type": "integer"
                  },
                  "google_search_queries": {
                    "type": "integer"
                  },
                  "image_generation_calls": {
                    "type": "integer"
                  },
                  "input_audio_seconds": {
                    "type": "number"
                  },
                  "input_audio_tokens": {
                    "type": "integer"
                  },
                  "input_image_tokens": {
                    "type": "integer"
                  },
                  "input_tokens": {
                    "type": "integer"
                  },
                  "output_audio_tokens": {
                    "type": "integer"
                  },
                  "output_image_tokens": {
                    "type": "integer"
                  },
                  "output_tokens": {
                    "type": "integer"
                  },
                  "provider_reported_cost": {
                    "type": "number"
                  },
                  "reasoning_tokens": {
                    "type": "integer"
                  },
                  "service_tier": {
                    "type": "string"
                  },
                  "url_context_requests": {
                    "type": "integer"
                  },
                  "web_fetch_requests": {
                    "type": "integer"
                  },
                  "web_search_calls": {
                    "type": "integer"
                  },
                  "web_search_requests": {
                    "type": "integer"
                  },
                  "x_search_calls": {
                    "type": "integer"
                  }
                },
                "required": [
                  "input_tokens",
                  "output_tokens"
                ],
                "type": "object"
              },
              "total_cost": {
                "description": "USD cost summed across all fan-out models and the consolidation call.",
                "type": "number"
              },
              "total_duration_ms": {
                "description": "End-to-end request duration in milliseconds.",
                "type": "integer"
              },
              "trace_uuid": {
                "description": "UUID of the trace span for this roundtable call.",
                "type": "string"
              }
            },
            "required": [
              "resolution",
              "models_used",
              "total_cost",
              "total_duration_ms"
            ],
            "type": "object"
          },
          "model": {
            "description": "Model name. Set on model_start / model_done and resolution_start.",
            "type": "string"
          },
          "model_index": {
            "description": "Index of the fan-out model this event refers to. Present on model_* events.",
            "type": "integer"
          },
          "schema_error": {
            "description": "Validation failure detail when schema_valid is false.",
            "type": "string"
          },
          "schema_valid": {
            "description": "output_schema validation result on model_done and resolution_done. Absent when no output_schema was supplied.",
            "type": "boolean"
          },
          "type": {
            "description": "Event type: model_start / model_delta / model_done / resolution_start / resolution_delta / resolution_done / done / error (every model was refused after the stream began; the stream ends there).",
            "type": "string"
          },
          "usage": {
            "description": "Token counts for the model that just completed (on model_done / resolution_done).",
            "properties": {
              "cache_creation_12h_tokens": {
                "type": "integer"
              },
              "cache_creation_1h_tokens": {
                "type": "integer"
              },
              "cache_creation_tokens": {
                "type": "integer"
              },
              "cache_read_tokens": {
                "type": "integer"
              },
              "code_interpreter_sessions": {
                "type": "integer"
              },
              "extra": {
                "type": "object"
              },
              "file_search_calls": {
                "type": "integer"
              },
              "google_search_prompts": {
                "type": "integer"
              },
              "google_search_queries": {
                "type": "integer"
              },
              "image_generation_calls": {
                "type": "integer"
              },
              "input_audio_seconds": {
                "type": "number"
              },
              "input_audio_tokens": {
                "type": "integer"
              },
              "input_image_tokens": {
                "type": "integer"
              },
              "input_tokens": {
                "type": "integer"
              },
              "output_audio_tokens": {
                "type": "integer"
              },
              "output_image_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              },
              "provider_reported_cost": {
                "type": "number"
              },
              "reasoning_tokens": {
                "type": "integer"
              },
              "service_tier": {
                "type": "string"
              },
              "url_context_requests": {
                "type": "integer"
              },
              "web_fetch_requests": {
                "type": "integer"
              },
              "web_search_calls": {
                "type": "integer"
              },
              "web_search_requests": {
                "type": "integer"
              },
              "x_search_calls": {
                "type": "integer"
              }
            },
            "required": [
              "input_tokens",
              "output_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "Route": {
        "properties": {
          "access": {
            "type": "string"
          },
          "data_handling": {
            "properties": {
              "caching": {
                "properties": {
                  "default": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "storage_location": {
                    "type": "string"
                  },
                  "ttl_seconds": {
                    "type": "integer"
                  }
                },
                "required": [
                  "default"
                ],
                "type": "object"
              },
              "logging": {
                "properties": {
                  "default": {
                    "type": "string"
                  },
                  "human_review": {
                    "type": "string"
                  },
                  "retention_days": {
                    "type": "integer"
                  },
                  "storage_location": {
                    "type": "string"
                  }
                },
                "required": [
                  "default",
                  "retention_days"
                ],
                "type": "object"
              },
              "moderation": {
                "properties": {
                  "default": {
                    "type": "string"
                  },
                  "human_review": {
                    "type": "string"
                  },
                  "retention_days": {
                    "type": "integer"
                  },
                  "storage_location": {
                    "type": "string"
                  }
                },
                "required": [
                  "default",
                  "retention_days"
                ],
                "type": "object"
              },
              "residency_enforced": {
                "type": "boolean"
              },
              "subprocessors_read_content": {
                "type": "boolean"
              },
              "training": {
                "properties": {
                  "default": {
                    "type": "string"
                  }
                },
                "required": [
                  "default"
                ],
                "type": "object"
              }
            },
            "required": [
              "training",
              "logging",
              "moderation",
              "caching"
            ],
            "type": "object"
          },
          "gdpr": {
            "properties": {
              "dpa_available": {
                "type": "boolean"
              },
              "residency": {
                "type": "string"
              },
              "transfer_mechanism": {
                "type": "string"
              }
            },
            "required": [
              "residency",
              "transfer_mechanism"
            ],
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "inference_location": {
            "type": "string"
          },
          "last_verified_at": {
            "type": "string"
          },
          "native_region": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "provider_display_name": {
            "type": "string"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "underlying_maker": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "provider_display_name",
          "native_region",
          "data_handling",
          "gdpr"
        ],
        "type": "object"
      },
      "RouteDataHandling": {
        "properties": {
          "caching": {
            "properties": {
              "default": {
                "type": "string"
              },
              "scope": {
                "type": "string"
              },
              "storage_location": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              }
            },
            "required": [
              "default"
            ],
            "type": "object"
          },
          "logging": {
            "properties": {
              "default": {
                "type": "string"
              },
              "human_review": {
                "type": "string"
              },
              "retention_days": {
                "type": "integer"
              },
              "storage_location": {
                "type": "string"
              }
            },
            "required": [
              "default",
              "retention_days"
            ],
            "type": "object"
          },
          "moderation": {
            "properties": {
              "default": {
                "type": "string"
              },
              "human_review": {
                "type": "string"
              },
              "retention_days": {
                "type": "integer"
              },
              "storage_location": {
                "type": "string"
              }
            },
            "required": [
              "default",
              "retention_days"
            ],
            "type": "object"
          },
          "residency_enforced": {
            "type": "boolean"
          },
          "subprocessors_read_content": {
            "type": "boolean"
          },
          "training": {
            "properties": {
              "default": {
                "type": "string"
              }
            },
            "required": [
              "default"
            ],
            "type": "object"
          }
        },
        "required": [
          "training",
          "logging",
          "moderation",
          "caching"
        ],
        "type": "object"
      },
      "RouteGDPR": {
        "properties": {
          "dpa_available": {
            "type": "boolean"
          },
          "residency": {
            "type": "string"
          },
          "transfer_mechanism": {
            "type": "string"
          }
        },
        "required": [
          "residency",
          "transfer_mechanism"
        ],
        "type": "object"
      },
      "RouteLogging": {
        "properties": {
          "default": {
            "type": "string"
          },
          "human_review": {
            "type": "string"
          },
          "retention_days": {
            "type": "integer"
          },
          "storage_location": {
            "type": "string"
          }
        },
        "required": [
          "default",
          "retention_days"
        ],
        "type": "object"
      },
      "RouteTraining": {
        "properties": {
          "default": {
            "type": "string"
          }
        },
        "required": [
          "default"
        ],
        "type": "object"
      },
      "SetManagementMemberRoleRequest": {
        "additionalProperties": false,
        "properties": {
          "expected_change_token": {
            "pattern": "^omrv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "expected_role_change_token": {
            "pattern": "^orv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]{1",
            "type": "string"
          },
          "role": {
            "pattern": "^(admin|developer|viewer|custom_[a-f0-9]{32})$",
            "type": "string"
          }
        },
        "required": [
          "role",
          "expected_change_token",
          "expected_role_change_token",
          "idempotency_key"
        ],
        "type": "object"
      },
      "SetManagementOrganizationModelListRequest": {
        "additionalProperties": false,
        "properties": {
          "compat_model_list": {
            "enum": [
              "all",
              "simplified",
              "recommended",
              "none"
            ],
            "type": "string"
          },
          "compat_model_list_dynamic_routes": {
            "type": "boolean"
          },
          "compat_model_list_enforced": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SetManagementProjectModelListRequest": {
        "additionalProperties": false,
        "properties": {
          "compat_model_list": {
            "enum": [
              "all",
              "simplified",
              "recommended",
              "none"
            ],
            "type": "string"
          },
          "compat_model_list_dynamic_routes": {
            "type": "boolean"
          },
          "compat_model_list_enforced": {
            "type": "boolean"
          }
        },
        "required": [
          "compat_model_list",
          "compat_model_list_dynamic_routes"
        ],
        "type": "object"
      },
      "SongEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "duration_seconds": {
                "type": "number"
              },
              "expires_at": {
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "model": {
                "type": "string"
              },
              "plan": {
                "type": "object"
              }
            },
            "required": [
              "id",
              "model",
              "created_at",
              "expires_at",
              "duration_seconds",
              "plan"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "SongListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "duration_seconds": {
                  "type": "number"
                },
                "expires_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "plan": {
                  "type": "object"
                }
              },
              "required": [
                "id",
                "model",
                "created_at",
                "expires_at",
                "duration_seconds",
                "plan"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "meta": {
            "properties": {
              "total_count": {
                "type": "integer"
              }
            },
            "required": [
              "total_count"
            ],
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "SpeechAudio": {
        "properties": {
          "b64_json": {
            "type": "string"
          },
          "file_id": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SpeechRequest": {
        "properties": {
          "format": {
            "type": "string"
          },
          "input": {
            "type": "string"
          },
          "max_retries": {
            "default": 2,
            "description": "Retries on the same endpoint when the provider rejects the call before doing any work (HTTP 429 or a gateway 502/503/504 with no result, or a connection that never reached it). Only the successful attempt is billed. Default 2 / max 3; 0 turns retries off.",
            "maximum": 3,
            "minimum": 0,
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          },
          "response_format": {
            "description": "Alias of format (OpenAI's name for it). If both are sent they must match. On /v3/audio/speech a value that is not an audio format (e.g. b64_json) is ignored; the compat route rejects it.",
            "type": "string"
          },
          "speed": {
            "type": "number"
          },
          "store": {
            "description": "Persist the generated audio to /v3/files and return a reusable file_id. Defaults to false; set true to store.",
            "type": "boolean"
          },
          "voice": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "input"
        ],
        "type": "object"
      },
      "SpeechResponse": {
        "properties": {
          "audio": {
            "properties": {
              "b64_json": {
                "type": "string"
              },
              "file_id": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "created": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "attempts": {
                "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
                "type": "integer"
              },
              "characters": {
                "type": "integer"
              },
              "cost": {
                "type": "number"
              },
              "input_bytes": {
                "type": "integer"
              }
            },
            "required": [
              "cost",
              "characters"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "model",
          "created",
          "audio",
          "usage"
        ],
        "type": "object"
      },
      "SpeechUsage": {
        "properties": {
          "attempts": {
            "description": "Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.",
            "type": "integer"
          },
          "characters": {
            "type": "integer"
          },
          "cost": {
            "type": "number"
          },
          "input_bytes": {
            "type": "integer"
          }
        },
        "required": [
          "cost",
          "characters"
        ],
        "type": "object"
      },
      "StartVerificationRequest": {
        "properties": {
          "return_url": {
            "description": "HTTPS page the person's browser opens after the liveness check. Omit for Opper's default page.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StreamOptions": {
        "properties": {
          "include_usage": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SubjectEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "error": {
                "type": "string"
              },
              "external_id": {
                "description": "Your own id for this person, as sent on create.",
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "kind": {
                "description": "person: a real person, usable once they pass a liveness check (POST /v3/subjects/{id}/verification). virtual: an AI-generated character, usable at once; it must not resemble a real person.",
                "enum": [
                  "person",
                  "virtual"
                ],
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "object": {
                "enum": [
                  "subject"
                ],
                "type": "string"
              },
              "providers": {
                "description": "Where the subject is registered, one entry per video provider with its status there. Its assets work with those providers' models. One provider today: bytedance:ap (Seedance).",
                "items": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "provider": {
                      "description": "The provider prefix of the models it works with, such as bytedance:ap.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The status at this provider; the same values as the top-level status.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "provider",
                    "status"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "status": {
                "description": "unverified: no check started. pending: a liveness link is out. verified: assets can be added and used. failed or expired: start a new verification.",
                "enum": [
                  "unverified",
                  "pending",
                  "verified",
                  "failed",
                  "expired"
                ],
                "type": "string"
              },
              "verified_at": {
                "format": "date-time",
                "type": "string"
              }
            },
            "required": [
              "id",
              "object",
              "kind",
              "name",
              "providers",
              "status",
              "created_at"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "SubjectListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "properties": {
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "external_id": {
                  "description": "Your own id for this person, as sent on create.",
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "description": "person: a real person, usable once they pass a liveness check (POST /v3/subjects/{id}/verification). virtual: an AI-generated character, usable at once; it must not resemble a real person.",
                  "enum": [
                    "person",
                    "virtual"
                  ],
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "object": {
                  "enum": [
                    "subject"
                  ],
                  "type": "string"
                },
                "providers": {
                  "description": "Where the subject is registered, one entry per video provider with its status there. Its assets work with those providers' models. One provider today: bytedance:ap (Seedance).",
                  "items": {
                    "properties": {
                      "error": {
                        "type": "string"
                      },
                      "provider": {
                        "description": "The provider prefix of the models it works with, such as bytedance:ap.",
                        "type": "string"
                      },
                      "status": {
                        "description": "The status at this provider; the same values as the top-level status.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "provider",
                      "status"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "status": {
                  "description": "unverified: no check started. pending: a liveness link is out. verified: assets can be added and used. failed or expired: start a new verification.",
                  "enum": [
                    "unverified",
                    "pending",
                    "verified",
                    "failed",
                    "expired"
                  ],
                  "type": "string"
                },
                "verified_at": {
                  "format": "date-time",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "object",
                "kind",
                "name",
                "providers",
                "status",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "TranscriptionJobResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status_url"
        ],
        "type": "object"
      },
      "TranscriptionRequest": {
        "properties": {
          "async": {
            "type": "boolean"
          },
          "audio": {
            "type": "string"
          },
          "diarize": {
            "type": "boolean"
          },
          "language": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "parameters": {
            "description": "Provider settings, forwarded verbatim. The keys each model takes are listed with descriptions in its `params.stt.parameters` (GET /v3/models?type=stt); a key the provider does not know is its error.",
            "type": "object"
          },
          "prompt": {
            "type": "string"
          },
          "stream": {
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "audio"
        ],
        "type": "object"
      },
      "TranscriptionResponse": {
        "properties": {
          "created": {
            "type": "integer"
          },
          "duration": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "segments": {
            "items": {
              "properties": {
                "end": {
                  "type": "number"
                },
                "speaker": {
                  "type": "string"
                },
                "start": {
                  "type": "number"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "start",
                "end",
                "text"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "text": {
            "type": "string"
          },
          "usage": {
            "properties": {
              "cost": {
                "type": "number"
              },
              "seconds": {
                "type": "number"
              }
            },
            "required": [
              "cost",
              "seconds"
            ],
            "type": "object"
          },
          "words": {
            "items": {
              "properties": {
                "confidence": {
                  "type": "number"
                },
                "end": {
                  "type": "number"
                },
                "start": {
                  "type": "number"
                },
                "word": {
                  "type": "string"
                }
              },
              "required": [
                "word",
                "start",
                "end"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "model",
          "created",
          "text",
          "usage"
        ],
        "type": "object"
      },
      "TranscriptionSegment": {
        "properties": {
          "end": {
            "type": "number"
          },
          "speaker": {
            "type": "string"
          },
          "start": {
            "type": "number"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "start",
          "end",
          "text"
        ],
        "type": "object"
      },
      "TranscriptionUsage": {
        "properties": {
          "cost": {
            "type": "number"
          },
          "seconds": {
            "type": "number"
          }
        },
        "required": [
          "cost",
          "seconds"
        ],
        "type": "object"
      },
      "TranscriptionWord": {
        "properties": {
          "confidence": {
            "type": "number"
          },
          "end": {
            "type": "number"
          },
          "start": {
            "type": "number"
          },
          "word": {
            "type": "string"
          }
        },
        "required": [
          "word",
          "start",
          "end"
        ],
        "type": "object"
      },
      "UnavailableModelsResponse": {
        "properties": {
          "has_more": {
            "description": "True when more rows follow this page. Request the next page with offset set to next_offset.",
            "type": "boolean"
          },
          "limit": {
            "type": "integer"
          },
          "models": {
            "items": {
              "properties": {
                "availability": {
                  "type": "string"
                },
                "capabilities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "context_window": {
                  "type": "integer"
                },
                "description": {
                  "type": "string"
                },
                "featured": {
                  "type": "boolean"
                },
                "input_modalities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "long_description": {
                  "type": "string"
                },
                "maker": {
                  "properties": {
                    "country": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "slug",
                    "display_name"
                  ],
                  "type": "object"
                },
                "max_output_tokens": {
                  "type": "integer"
                },
                "model": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "output_modalities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "references": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "updated_at": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "url"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "release": {
                  "properties": {
                    "date": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "date",
                    "source"
                  ],
                  "type": "object"
                },
                "short_description": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "model",
                "name",
                "type",
                "capabilities",
                "availability",
                "maker"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "next_offset": {
            "description": "Offset of the next page. Present only when has_more is true.",
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "models",
          "total",
          "offset",
          "limit",
          "has_more"
        ],
        "type": "object"
      },
      "UpdateFileRequest": {
        "properties": {
          "ttl_seconds": {
            "description": "Positive integer (max 3153600000",
            "type": "integer"
          }
        },
        "required": [
          "ttl_seconds"
        ],
        "type": "object"
      },
      "UpdateManagementAPIKeyRequest": {
        "properties": {
          "allowed_ips": {
            "description": "Leave it out to keep the key's allowlist. Replaces the key's allowlist; null or [] clears it so the key accepts any IP. IP addresses or CIDR ranges the key accepts calls from (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only; up to 100 entries; ranges no wider than /8 for IPv4 or /16 for IPv6. Empty accepts any IP. Calls from any other address get 403 ip_not_allowed. A change takes up to a minute to apply.",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          },
          "name": {
            "description": "The key's new name. Leave it out to keep the name.",
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateManagementCustomModelRequest": {
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "identifier"
            ]
          },
          {
            "required": [
              "credential"
            ]
          }
        ],
        "properties": {
          "credential": {
            "description": "Nonblank replacement provider credential. Omit to preserve stored bytes. Null or empty does not clear it. Never returned or tested with a provider.",
            "format": "password",
            "maxLength": 8192,
            "minLength": 1,
            "type": "string",
            "writeOnly": true
          },
          "expected_change_token": {
            "description": "Opaque token from the reviewed state. Never automatically refresh it after a conflict.",
            "maxLength": 48,
            "minLength": 48,
            "pattern": "^cmv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "idempotency_key": {
            "description": "Required actor-bound update identity. Recover this operation after an uncertain response; never replace the identity simply to retry.",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]{1",
            "type": "string"
          },
          "identifier": {
            "description": "Declared default-endpoint OpenAI LLM identifier. Omit to preserve it. No provider request validates it.",
            "maxLength": 255,
            "pattern": "^openai/[A-Za-z0-9][A-Za-z0-9._:-]*$",
            "type": "string"
          },
          "name": {
            "description": "Nonblank display name. Omit to preserve the current name.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "expected_change_token",
          "idempotency_key"
        ],
        "type": "object"
      },
      "UpdateManagementProjectRequest": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateManagementRoleRequest": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "expected_change_token": {
            "pattern": "^orv1_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]{1",
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          },
          "priority": {
            "maximum": 299,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "display_name",
          "permissions",
          "priority",
          "expected_change_token",
          "idempotency_key"
        ],
        "type": "object"
      },
      "UpdateSpanRequest": {
        "properties": {
          "end_time": {
            "format": "date-time",
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "meta": {
            "type": "object"
          },
          "metadata": {
            "type": "object"
          },
          "output": {
            "type": "string"
          },
          "tags": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "VerificationEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "expires_at": {
                "description": "The link stops working at this time (about 30 minutes). Start a new verification after it.",
                "format": "date-time",
                "type": "string"
              },
              "subject_id": {
                "type": "string"
              },
              "url": {
                "description": "Send this link to the person only: they open it on their phone, consent and do a short liveness check. No account or login. It carries temporary credentials; do not log or store it.",
                "type": "string"
              }
            },
            "required": [
              "subject_id",
              "url",
              "expires_at"
            ],
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "meta",
          "data"
        ],
        "type": "object"
      },
      "VideoRequest": {
        "properties": {
          "aspect_ratio": {
            "description": "Output shape from the model's `params.video.aspect_ratios`, such as `16:9` or `9:16`.",
            "type": "string"
          },
          "audio": {
            "description": "Audio the character speaks, lips in sync: URL, data-URI or `file_\u003cid\u003e`. Needs `audio_to_video`; on a `lip_sync` model it sets the clip length.",
            "type": "string"
          },
          "callback_url": {
            "description": "HTTPS URL that receives a signed `video.completed` or `video.failed` webhook when the job ends, so you do not have to poll. Rules, each answered with a 400 that names it: https only, port 443 (or none), no `user:password@`, no `#fragment`, at most 2048 characters, and a host that is a public IP address or a public name resolving only to public addresses (no localhost, private, link-local, metadata or internal names). Verify the signature with the project's secret from GET /v3/webhooks/secret; see the `jobCompleted` webhook for the payload, headers and retries.",
            "type": "string"
          },
          "document": {
            "type": "string"
          },
          "image": {
            "description": "First frame to animate (image-to-video): URL, data-URI or `file_\u003cid\u003e`. Needs the `image_to_video` capability.",
            "type": "string"
          },
          "last_image": {
            "description": "Ending frame the clip moves to; needs `image` and the `last_frame` capability.",
            "type": "string"
          },
          "max_retries": {
            "default": 2,
            "description": "Retries of the provider's create call on the same endpoint when the provider rejects it before doing any work (HTTP 429 or a gateway 502/503/504 with no result, or a connection that never reached it). A job that is already rendering is never submitted again. Only the successful attempt is billed. Default 2 / max 3; 0 turns retries off.",
            "maximum": 3,
            "minimum": 0,
            "type": "integer"
          },
          "model": {
            "description": "A model id from GET /v3/videos/models, such as `bytedance:ap/seedance-2.5`. Ids name the provider; a bare model name answers 400 with the ids that serve it.",
            "type": "string"
          },
          "parameters": {
            "description": "Provider settings, forwarded verbatim, such as `generate_audio` (native audio changes the price, and its default differs by provider). The keys each model takes are listed with descriptions in its `params.video.parameters` (GET /v3/videos/models).",
            "type": "object"
          },
          "prompt": {
            "description": "What the clip shows. Optional on `lip_sync` models, where `audio` drives the clip.",
            "type": "string"
          },
          "reference_audios": {
            "description": "Audio clips the video follows (voice, music, sound effects), cited in the prompt as audio 1, 2 and so on: URL, data-URI or `file_\u003cid\u003e`, wav or mp3, at most 10. Needs the `reference_audio` capability. Seedance 2.5 takes up to 10 clips of 2 to 30 s (30 s in all), Seedance 2.0 up to 3 of 2 to 15 s and needs a reference image or video next to them, as does Seedance 2.5 on fal. Not with `image` or `last_image`: put the image in `reference_images`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reference_images": {
            "description": "Images of a subject or character to keep consistent; they are not frames. Needs the `reference_images` capability.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reference_videos": {
            "description": "More source videos after `video`, cited in the prompt as video 1, 2 and so on (Seedance 2.0 takes three in all, Seedance 2.5 ten). Needs the `reference_video` capability.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "resolution": {
            "description": "Output tier from the model's `params.video.resolutions`, such as `480p`, `720p`, `1080p` or `4k`. Most models bill each tier at its own rate (`pricing.rates`).",
            "type": "string"
          },
          "seconds": {
            "description": "Clip length in seconds, between the model's `params.video.min_duration` and `max_duration`; a model that renders only fixed lengths lists them in `params.video.durations` (Veo: 4, 6, 8).",
            "type": "integer"
          },
          "size": {
            "description": "Provider size such as `1280x720`, for models that take one instead of `resolution`.",
            "type": "string"
          },
          "store": {
            "description": "Persist the finished video to /v3/files and return a reusable file_id on the status poll. Defaults to false; set true to store.",
            "type": "boolean"
          },
          "video": {
            "description": "A clip to edit, extend or re-animate: URL, data-URI or `file_\u003cid\u003e`. Needs `video_editing`, `video_extension` or `reference_video`.",
            "type": "string"
          },
          "web_url": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "prompt"
        ],
        "type": "object"
      },
      "VideoResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status_url"
        ],
        "type": "object"
      },
      "VoiceObject": {
        "properties": {
          "accent": {
            "type": "string"
          },
          "created": {
            "type": "integer"
          },
          "default": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "expires_at": {
            "type": "integer"
          },
          "gender": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "languages": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "preview_url": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "use_case": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "provider"
        ],
        "type": "object"
      },
      "WebFetchRequest": {
        "properties": {
          "engine": {
            "description": "Fetch backend. auto (default) routes to Jina.",
            "enum": [
              "auto",
              "jina"
            ],
            "type": "string"
          },
          "max_chars": {
            "description": "Truncate the returned content to at most this many characters. 0 means unbounded (return the full page).",
            "type": "integer"
          },
          "url": {
            "description": "The HTTP or HTTPS URL to fetch. Required.",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "WebFetchResponse": {
        "properties": {
          "content": {
            "description": "Page content as Markdown. Truncated to max_chars if set.",
            "type": "string"
          },
          "title": {
            "description": "Page title as extracted from the rendered HTML.",
            "type": "string"
          },
          "url": {
            "description": "Canonical URL of the fetched page (may differ from the requested URL after redirects).",
            "type": "string"
          }
        },
        "required": [
          "url",
          "title",
          "content"
        ],
        "type": "object"
      },
      "WebSearchRequest": {
        "properties": {
          "allowed_domains": {
            "description": "Restrict results to these domains (e.g. \"go.dev\" or \"pkg.go.dev\").",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "country": {
            "description": "Two-letter ISO-3166 alpha-2 country code (e.g. \"se\" or \"us\") biasing results to that region. Case-insensitive.",
            "type": "string"
          },
          "engine": {
            "description": "Search backend. auto (default) routes to Opper's default engine (Jina today). jina / exa / exa-lite / linkup / searchbase pin a specific backend (when configured server-side). exa-lite is Exa's cheaper search type on the same index.",
            "enum": [
              "auto",
              "jina",
              "exa",
              "exa-lite",
              "linkup",
              "searchbase"
            ],
            "type": "string"
          },
          "excluded_domains": {
            "description": "Exclude results from these domains (e.g. \"reddit.com\").",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "max_results": {
            "description": "Maximum results per page. 0 uses the engine default (typically 5). Must be between 0 and 20.",
            "type": "integer"
          },
          "max_total_results": {
            "description": "Cap on total results accumulated across pages. 0 disables pagination. Silently ignored on engines without paginated search.",
            "type": "integer"
          },
          "query": {
            "description": "Search query string. Required.",
            "type": "string"
          },
          "search_context_size": {
            "description": "Per-result snippet length in characters. very_low ≈ 1000; low ≈ 5000; medium ≈ 10000 (default); high ≈ 30000; full returns the full extracted page content (capped ~50000).",
            "enum": [
              "very_low",
              "low",
              "medium",
              "high",
              "full"
            ],
            "type": "string"
          }
        },
        "required": [
          "query"
        ],
        "type": "object"
      },
      "WebSearchResponse": {
        "properties": {
          "results": {
            "items": {
              "properties": {
                "published_at": {
                  "description": "Publication date when reported by the engine. Empty when unknown.",
                  "type": "string"
                },
                "score": {
                  "description": "Relevance score when reported by the engine. Omitted on engines that don't expose one (e.g. Jina).",
                  "type": "number"
                },
                "snippet": {
                  "description": "Short text excerpt from the page. Length is bounded by the request's search_context_size.",
                  "type": "string"
                },
                "title": {
                  "description": "Page title as reported by the search engine.",
                  "type": "string"
                },
                "url": {
                  "description": "Canonical URL of the result page.",
                  "type": "string"
                }
              },
              "required": [
                "title",
                "url",
                "snippet"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "WebSearchResult": {
        "properties": {
          "published_at": {
            "description": "Publication date when reported by the engine. Empty when unknown.",
            "type": "string"
          },
          "score": {
            "description": "Relevance score when reported by the engine. Omitted on engines that don't expose one (e.g. Jina).",
            "type": "number"
          },
          "snippet": {
            "description": "Short text excerpt from the page. Length is bounded by the request's search_context_size.",
            "type": "string"
          },
          "title": {
            "description": "Page title as reported by the search engine.",
            "type": "string"
          },
          "url": {
            "description": "Canonical URL of the result page.",
            "type": "string"
          }
        },
        "required": [
          "title",
          "url",
          "snippet"
        ],
        "type": "object"
      },
      "ZDRFacts": {
        "properties": {
          "caching": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "logging": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "moderation": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "subprocessors": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "training": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "logging",
          "moderation",
          "caching",
          "training",
          "subprocessors"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "AnalyticsBearer": {
        "bearerFormat": "Analytics API Key",
        "description": "Internal analytics key (op-ana- prefix), minted by staff. Inference keys are not accepted.",
        "scheme": "bearer",
        "type": "http"
      },
      "BearerAuth": {
        "bearerFormat": "API Key",
        "description": "API key authentication. Pass your API key as a Bearer token.",
        "scheme": "bearer",
        "type": "http"
      },
      "MCPBearer": {
        "description": "Delegated user OAuth access token for the Opper MCP resource. Obtain through advertised OAuth authorization; runtime and management service keys are not accepted.",
        "scheme": "bearer",
        "type": "http"
      },
      "ManagementBearer": {
        "bearerFormat": "Management API Key",
        "description": "Management API authentication. Pass an `op-mak-…` management token as a Bearer token. Runtime `op-…` API keys are rejected with 403 — they belong on the data-plane endpoints. Mint a management key from the platform UI under Settings → API keys.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Schema-driven generative API that orchestrates LLM-powered workflows.",
    "title": "Task API",
    "version": "3.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/admin-analytics/v1/pond/athena/queries": {
      "post": {
        "description": "Submits one read-only SELECT over approved warehouse tables to Athena, using an analytics key. Window functions and approx_percentile are supported. Quote literal dotted columns such as \"usage.input\". Poll the returned query_id for the result.",
        "operationId": "startPondQuery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "limit": {
                    "default": 1000,
                    "maximum": 10000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "sql": {
                    "maxLength": 32768,
                    "type": "string"
                  }
                },
                "required": [
                  "sql"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "query_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "AnalyticsBearer": []
          }
        ],
        "summary": "Start a pond query",
        "tags": [
          "Admin analytics"
        ]
      }
    },
    "/admin-analytics/v1/pond/athena/queries/{query_id}": {
      "delete": {
        "description": "Requests cancellation of a queued or running query.",
        "operationId": "cancelPondQuery",
        "parameters": [
          {
            "description": "The handle a submitted query returned, valid for one hour.",
            "in": "path",
            "name": "query_id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{40,512}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "query_id": {
                          "type": "string"
                        },
                        "result": {
                          "properties": {
                            "columns": {
                              "items": {
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "rows": {
                              "items": {
                                "items": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "type": "array"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "meta": {
                      "properties": {
                        "elapsed_ms": {
                          "type": "integer"
                        },
                        "scanned_bytes": {
                          "type": "integer"
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "AnalyticsBearer": []
          }
        ],
        "summary": "Cancel a pond query",
        "tags": [
          "Admin analytics"
        ]
      },
      "get": {
        "description": "Returns the query's status and, once it is SUCCEEDED, its rows: positional arrays matching the columns, with every cell a string or null. Results are capped at 10000 rows and 4 MiB.",
        "operationId": "getPondQuery",
        "parameters": [
          {
            "description": "The handle a submitted query returned, valid for one hour.",
            "in": "path",
            "name": "query_id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{40,512}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "query_id": {
                          "type": "string"
                        },
                        "result": {
                          "properties": {
                            "columns": {
                              "items": {
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "rows": {
                              "items": {
                                "items": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "type": "array"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "meta": {
                      "properties": {
                        "elapsed_ms": {
                          "type": "integer"
                        },
                        "scanned_bytes": {
                          "type": "integer"
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "AnalyticsBearer": []
          }
        ],
        "summary": "Get a pond query",
        "tags": [
          "Admin analytics"
        ]
      }
    },
    "/health": {
      "get": {
        "description": "Returns server health status.",
        "operationId": "healthCheck",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "example": "ok",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "Health check",
        "tags": [
          "System"
        ]
      }
    },
    "/management/mcp": {
      "post": {
        "description": "Serves this management API to AI agents over the Model Context Protocol, revision `2026-07-28`, using the stateless Streamable HTTP binding. Every operation under `/management/v1` is exposed as an MCP tool, and a tool call is executed as the corresponding HTTP request — same authentication, same plan gate, same scope guard. `tools/list` returns only the tools the calling key's scopes permit.\n\nThere is no session: the `initialize` handshake and `Mcp-Session-Id` are not part of this revision, so each POST is self-contained and any request may land on any instance. Send a single JSON-RPC 2.0 request (batches are not accepted) with `method` set to `server/discover`, `tools/list` or `tools/call`, and carry the required per-request metadata in `params._meta`: `io.modelcontextprotocol/protocolVersion` and `io.modelcontextprotocol/clientCapabilities`.\n\nThree headers are required and must agree with the body, or the request is rejected with `400` and JSON-RPC code `-32020`: `MCP-Protocol-Version` (matching `_meta`), `Mcp-Method` (matching `method`), and — on `tools/call` — `Mcp-Name` (matching `params.name`). An unimplemented method returns `404` with code `-32601`; an unsupported protocol version returns `400` with code `-32022` and the versions this server does support. `GET` and `DELETE` return `405`: they belonged to the session-based revisions.\n\nThe path carries no version: the version that matters is the protocol's, and it travels per-request in the `MCP-Protocol-Version` header and `_meta`.\n\nAuthenticate exactly as for the rest of the management surface — an `op-mak-…` management key as a Bearer token.",
        "operationId": "callManagementMCP",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "id": {
                    "description": "Request identifier: a string or a number, never null. Echoed back on the response.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  "jsonrpc": {
                    "description": "JSON-RPC version. Always `2.0`.",
                    "enum": [
                      "2.0"
                    ],
                    "type": "string"
                  },
                  "method": {
                    "description": "The RPC to invoke. Must equal the `Mcp-Method` header.",
                    "enum": [
                      "server/discover",
                      "tools/list",
                      "tools/call"
                    ],
                    "type": "string"
                  },
                  "params": {
                    "description": "Method parameters. `_meta` is required on every request; `name` and `arguments` apply to `tools/call`.",
                    "properties": {
                      "_meta": {
                        "description": "Per-request protocol metadata. This replaced the `initialize` handshake, which is why it is required on every request.",
                        "properties": {
                          "io.modelcontextprotocol/clientCapabilities": {
                            "description": "Client capabilities relevant to this request. Send `{}` if none apply.",
                            "type": "object"
                          },
                          "io.modelcontextprotocol/clientInfo": {
                            "description": "Optional client name and version, for display and debugging only.",
                            "type": "object"
                          },
                          "io.modelcontextprotocol/protocolVersion": {
                            "description": "MCP revision this request uses. Must equal the `MCP-Protocol-Version` header.",
                            "example": "2026-07-28",
                            "type": "string"
                          }
                        },
                        "required": [
                          "io.modelcontextprotocol/protocolVersion",
                          "io.modelcontextprotocol/clientCapabilities"
                        ],
                        "type": "object"
                      },
                      "arguments": {
                        "description": "Arguments for the tool, matching its `inputSchema` from `tools/list`.",
                        "type": "object"
                      },
                      "name": {
                        "description": "Tool to invoke, for `tools/call`. Must equal the `Mcp-Name` header.",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON-RPC 2.0 response carrying either `result` or `error`, never both.",
                  "properties": {
                    "error": {
                      "description": "Present on failure, in place of `result`.",
                      "properties": {
                        "code": {
                          "description": "`-32020` header/body mismatch, `-32022` unsupported protocol version, `-32601` method not found, `-32602` invalid params.",
                          "type": "integer"
                        },
                        "data": {
                          "description": "Extra context. `-32022` carries the supported and requested versions here.",
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "id": {
                      "description": "The id of the request this answers."
                    },
                    "jsonrpc": {
                      "enum": [
                        "2.0"
                      ],
                      "type": "string"
                    },
                    "result": {
                      "description": "Present on success. Always carries `resultType: \"complete\"`; the remaining fields depend on the method — `tools` for `tools/list`, `content`/`structuredContent`/`isError` for `tools/call`, `supportedVersions`/`capabilities` for `server/discover`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "`GET` or `DELETE` on the MCP endpoint. Protocol-level sessions and the standalone `GET` event stream were removed in revision 2026-07-28; this endpoint accepts `POST` only."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "MCP endpoint (Model Context Protocol)",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/controls/rules": {
      "get": {
        "description": "Lists rules in the calling organization. Project filters include inherited organization rules and matching function rules. Allowlist rules include effective_count and parent_allowlist; guard rules may include allowed_model_ids. Requires the `controls:read` scope.",
        "operationId": "listManagementControlRules",
        "parameters": [
          {
            "description": "Only rules that apply in this project",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Only rules of this kind",
            "in": "query",
            "name": "kind",
            "schema": {
              "enum": [
                "guard",
                "observe",
                "route",
                "comply"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementControlRule"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List control rules",
        "tags": [
          "Management"
        ]
      },
      "post": {
        "description": "Creates a rule with a client-generated UUID. Setting enabled applies it immediately. Read rules again to inspect effective policy. Requires the `controls:write` scope.",
        "operationId": "createManagementControlRule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "config": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "description": "Spending cap that resets per period (day, week or month) or holds in total. At most one enabled budget per target; a project, role or member cap cannot exceed an organization cap of the same period. The server enforces cross-rule constraints when saving.",
                        "properties": {
                          "alerts_enabled": {
                            "description": "Alert preference stored with the budget rule.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "counted_from": {
                            "description": "Where a total cap counts spend from; omitted means the rule's creation. Set it to now to reset a total cap.",
                            "format": "date-time",
                            "type": "string"
                          },
                          "monthly_limit_cents": {
                            "description": "Cap per period in integer USD cents: 100 cents = $1; 1000 = $10; 10000 = $100. Zero is a zero-dollar cap, not unlimited. Named for the monthly period it once always was; it is the cap for whichever period is set.",
                            "minimum": 0,
                            "type": "integer",
                            "x-currency": "USD",
                            "x-unit": "cents"
                          },
                          "period": {
                            "description": "When the cap resets: day (00:00 UTC), week (Monday 00:00 UTC), month (with the billing period), or total (never; counts from counted_from). Omitted means month.",
                            "enum": [
                              "day",
                              "week",
                              "month",
                              "total"
                            ],
                            "type": "string"
                          },
                          "soft_limit_pct": {
                            "description": "Warning threshold as a percentage of the cap; 80 means 80%. Zero or omission means unset.",
                            "maximum": 100,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": {
                            "const": "budget",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "monthly_limit_cents"
                        ],
                        "title": "comply.budget",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Constrain models, provider companies/routes, locations, makers, and upstream data handling. Omitted/empty categories impose no restriction; configured categories combine with AND. Child scopes may only narrow parents; exclusions accumulate and win. Use schema_version=4: models and exclude_models list model keys, endpoints and exclude_endpoints list endpoint ids, and an endpoint is pinned when its model is in models or its id is in endpoints. schema_version=5 adds \"*\" wildcards in exclude_models and exclude_endpoints (exclude_models [\"*deepseek*\"] blocks every DeepSeek model) and except_models / except_endpoints, exceptions that lift the same rule's exclusions only; write 5 only when the rule uses either. Inspect get_allowed_models/inherited policy before applying. Model/provider examples illustrate syntax; use the current catalog to select values.",
                        "properties": {
                          "allowlist": {
                            "additionalProperties": false,
                            "properties": {
                              "custom_models": {
                                "description": "Own custom models (list_custom_models ids) this rule lets through unchecked. Add {id}; on update send back each stored id and fingerprint.",
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fingerprint": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "type": "object"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "endpoints": {
                                "items": {
                                  "description": "Endpoint ids to allow: the id field of a list_models entry, such as gemini/gemma-4-31b. Pins one endpoint and no other of its model. With models it is one pin list: an endpoint is allowed when its model is in models or its id is here, and the other categories allow it.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_endpoints": {
                                "items": {
                                  "description": "Schema_version 5. Endpoint ids or \"*\" patterns this rule's exclusions do not deny, as except_models but per endpoint.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_models": {
                                "items": {
                                  "description": "Schema_version 5. Model keys or \"*\" patterns this rule's exclude_models and exclude_endpoints do not deny: exclude_models [\"*deepseek*\"] with except_models [\"deepseek-v4\"] blocks every DeepSeek model but that one. Lifts nothing another rule excludes and pins nothing. Each entry must except something the rule excludes.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_endpoints": {
                                "items": {
                                  "description": "Endpoint ids to deny: the id field of a list_models entry, such as gemini/gemma-4-31b. From schema_version 5 an entry may hold \"*\" wildcards. Exclusions accumulate down scopes and override allowlists.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_models": {
                                "items": {
                                  "description": "Model keys to deny on every provider: the model field of a list_models entry. From schema_version 5 an entry may hold \"*\" for any characters (\"*deepseek*\"); a wildcard must match a catalog model when saved. Exclusions accumulate down scopes and override allowlists. Do not include and exclude the same model.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "handling": {
                                "additionalProperties": false,
                                "properties": {
                                  "cache_scopes": {
                                    "items": {
                                      "enum": [
                                        "api_key",
                                        "organization",
                                        "shared"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "caching": {
                                    "items": {
                                      "enum": [
                                        "explicit",
                                        "implicit",
                                        "none"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "human_review": {
                                    "items": {
                                      "enum": [
                                        "human_can_view",
                                        "none",
                                        "signals_only"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "logging": {
                                    "items": {
                                      "enum": [
                                        "abuse_monitoring",
                                        "limited_debug",
                                        "none",
                                        "other"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "max_retention_days": {
                                    "description": "Maximum upstream provider content-retention days, separate from Opper storage retention. Zero requires no upstream retention; null/omission imposes no cap.",
                                    "minimum": 0,
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "x-unit": "days"
                                  },
                                  "moderation": {
                                    "items": {
                                      "enum": [
                                        "default_on",
                                        "mandatory",
                                        "none",
                                        "optional"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "subprocessors_read_content": {
                                    "description": "False requires that subprocessors do not read content; null/omission does not consult the category.",
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  },
                                  "training": {
                                    "items": {
                                      "enum": [
                                        "no",
                                        "yes"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "maker": {
                                "additionalProperties": false,
                                "properties": {
                                  "jurisdiction": {
                                    "items": {
                                      "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                      "enum": [
                                        "AE",
                                        "AR",
                                        "AT",
                                        "AU",
                                        "BE",
                                        "BG",
                                        "BH",
                                        "BR",
                                        "CA",
                                        "CH",
                                        "CL",
                                        "CN",
                                        "CY",
                                        "CZ",
                                        "DE",
                                        "DK",
                                        "EE",
                                        "EEA",
                                        "EG",
                                        "ES",
                                        "EU",
                                        "FI",
                                        "FR",
                                        "GB",
                                        "GLOBAL",
                                        "GR",
                                        "HK",
                                        "HR",
                                        "HU",
                                        "ID",
                                        "IE",
                                        "IL",
                                        "IN",
                                        "IS",
                                        "IT",
                                        "JP",
                                        "KE",
                                        "KR",
                                        "KW",
                                        "LI",
                                        "LT",
                                        "LU",
                                        "LV",
                                        "MT",
                                        "MX",
                                        "MY",
                                        "NG",
                                        "NL",
                                        "NO",
                                        "NZ",
                                        "PH",
                                        "PL",
                                        "PT",
                                        "QA",
                                        "RO",
                                        "RS",
                                        "SA",
                                        "SE",
                                        "SG",
                                        "SI",
                                        "SK",
                                        "TH",
                                        "TR",
                                        "TW",
                                        "UA",
                                        "US",
                                        "VN",
                                        "ZA"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "name": {
                                    "items": {
                                      "description": "Slug of the company that trained the weights.",
                                      "minLength": 1,
                                      "pattern": "^\\S(?:.*\\S)?$",
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "models": {
                                "items": {
                                  "description": "Model keys to allow: the model field of a list_models entry, such as gemma-4-31b. A key admits every endpoint of that model the other categories allow. Verify the resulting callable ids with get_allowed_models.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "provider": {
                                "additionalProperties": false,
                                "properties": {
                                  "locations": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "inference": {
                                        "additionalProperties": false,
                                        "description": "Where inference runs. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "jurisdiction": {
                                        "additionalProperties": false,
                                        "description": "The provider's ultimate parent's legal home, separate from inference/storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "storage": {
                                        "additionalProperties": false,
                                        "description": "Where upstream retained content is stored. A route retaining no content satisfies storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "name": {
                                    "additionalProperties": false,
                                    "description": "Provider company public slugs, not adapter keys. Do not include and exclude the same company.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "route": {
                                    "additionalProperties": false,
                                    "description": "Individual catalog service-route IDs. Do not include and exclude the same route.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "type": {
                            "const": "allowlist",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "allowlist"
                        ],
                        "title": "comply.allowlist",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Opper storage retention, separate from upstream provider retention in allowlist.handling.max_retention_days. The strictest enabled org/project retention wins. Files the customer stores explicitly (uploads, store: true) are outside retention and are never deleted by it.",
                        "properties": {
                          "retention_days": {
                            "description": "0–30 days. Zero enables zero-day storage retention. Null/omission contributes no retention cap.",
                            "maximum": 30,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "days"
                          },
                          "type": {
                            "const": "retention",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "comply.retention",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Response caching is switched by the outer rule's enabled flag.",
                        "properties": {
                          "ttl_seconds": {
                            "default": 3600,
                            "description": "Cache lifetime in seconds. Null/omission uses the server default; zero is invalid.",
                            "maximum": 3600,
                            "minimum": 60,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "seconds"
                          },
                          "type": {
                            "const": "cache",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "route.cache",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Order a bare model's provider pool. Custom CEL keys are compiled on save and sort ascending over model.cost, model.ttft and model.throughput. Presets need no expression.",
                        "else": {
                          "not": {
                            "required": [
                              "expression"
                            ]
                          }
                        },
                        "if": {
                          "properties": {
                            "order": {
                              "const": "custom",
                              "type": "string"
                            }
                          },
                          "required": [
                            "order"
                          ]
                        },
                        "properties": {
                          "expression": {
                            "description": "CEL sort key; only valid when order=custom.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "order": {
                            "enum": [
                              "cost",
                              "latency",
                              "throughput",
                              "weighted",
                              "custom"
                            ],
                            "type": "string"
                          },
                          "type": {
                            "const": "pool_order",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "order"
                        ],
                        "then": {
                          "required": [
                            "expression"
                          ]
                        },
                        "title": "route.pool_order",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Match with Go regular expressions, compiled on save. Exceptions let a match through when the matched text contains a match of one of them (Go regex has no lookaround). Use the outer rule scope, not embedded scope or identity. An empty patterns list is an inert draft.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "regex",
                            "type": "string"
                          },
                          "exceptions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save. A pattern match that contains a match of it is let through: not flagged, blocked or redacted.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "patterns": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "patterns"
                        ],
                        "title": "guard.regex",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate a natural-language guard prompt. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "llm",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "prompt": {
                            "description": "Natural-language check performed by the guard.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "prompt"
                        ],
                        "title": "guard.llm",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Score the text against categories with a decision model (catalog type evaluation): one true-or-false question per category, fired when a category's probability reaches its threshold. Fast and cheap; flags or blocks but cannot redact. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "categories": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "description": "Custom category name, reported in findings.",
                                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                                  "type": "string"
                                },
                                "preset": {
                                  "description": "A category Opper maintains. Takes no name or statement.",
                                  "enum": [
                                    "jailbreak",
                                    "pii",
                                    "prompt_injection",
                                    "toxicity"
                                  ],
                                  "type": "string"
                                },
                                "statement": {
                                  "description": "Custom category: a sentence that is true when the text should be caught.",
                                  "maxLength": 1000,
                                  "type": "string"
                                },
                                "threshold": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 1,
                                  "type": "number"
                                }
                              },
                              "type": "object"
                            },
                            "maxItems": 16,
                            "minItems": 1,
                            "type": "array"
                          },
                          "engine": {
                            "const": "decision",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "model": {
                            "description": "Decision model (catalog type evaluation). Omit for the server's default ladder.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "on_error": {
                            "default": "allow",
                            "description": "What the guard does when no model answers.",
                            "enum": [
                              "allow",
                              "block"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "description": "Default threshold for categories without their own; omit to use each preset's.",
                            "exclusiveMinimum": 0,
                            "maximum": 1,
                            "type": "number"
                          }
                        },
                        "required": [
                          "engine",
                          "categories"
                        ],
                        "title": "guard.decision",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate sampled generations with the server's Controls judge. Sampling rate is one in N, not a percentage. Each matching rule produces an independent evaluation. Use the outer rule's enabled flag and scope.",
                        "if": {
                          "properties": {
                            "score_type": {
                              "const": "binary",
                              "type": "string"
                            }
                          },
                          "required": [
                            "score_type"
                          ]
                        },
                        "properties": {
                          "criteria": {
                            "description": "Evaluation rubric. Required for binary scoring; omit for the default score rubric.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "evaluators": {
                            "description": "Uses the server's Controls judge; client model tiers are not configurable.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "type": {
                                  "const": "judge",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "type": "object"
                            },
                            "maxItems": 1,
                            "minItems": 1,
                            "type": "array"
                          },
                          "sampling": {
                            "oneOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "strategy": {
                                    "const": "all",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "rate": {
                                    "default": 10,
                                    "description": "Evaluate 1 in N generations. rate=10 is about 10%; rate=100 is about 1%.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "rate",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "base_rate": {
                                    "default": 100,
                                    "description": "Evaluations per window before adaptive throttling.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "adaptive",
                                    "type": "string"
                                  },
                                  "window": {
                                    "default": "1h",
                                    "enum": [
                                      "1h",
                                      "24h"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "score_type": {
                            "default": "score",
                            "enum": [
                              "score",
                              "binary"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "default": 0.5,
                            "description": "Scores below this value are flagged. Omission or zero uses 0.5. Binary scoring flags a zero verdict.",
                            "maximum": 1,
                            "minimum": 0,
                            "type": "number"
                          }
                        },
                        "required": [
                          "evaluators"
                        ],
                        "then": {
                          "required": [
                            "criteria"
                          ]
                        },
                        "title": "observe",
                        "type": "object"
                      }
                    ],
                    "description": "Config for the rule kind. Replaces the full config on update. Read existing rules and get_rule_vocabulary before changing it; organization constraints remain in force. For an allowlist, its description says which schema_version to write. Opper retention_days and upstream handling.max_retention_days are separate controls."
                  },
                  "confirm_file_deletion": {
                    "description": "Deprecated and ignored: no rule deletes stored files.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "description": "Whether the rule is enforced. Omitted on create means false.",
                    "type": "boolean"
                  },
                  "id": {
                    "description": "Client-generated UUID for this new rule.",
                    "format": "uuid",
                    "type": "string"
                  },
                  "idempotency_key": {
                    "description": "Optional operation identifier. Reuse it with the same rule id and create payload when retrying an uncertain response. A changed payload or a deleted original rule returns 409; successful replay returns the existing rule without recreating it.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[A-Za-z0-9._:-]{1,128}$",
                    "type": "string"
                  },
                  "kind": {
                    "enum": [
                      "guard",
                      "observe",
                      "route",
                      "comply"
                    ],
                    "type": "string"
                  },
                  "name": {
                    "description": "Display name; null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "schema_version": {
                    "description": "Config schema version. Omit on create for version 1. Version 2 comply allowlists identify providers by company slug. Use 4 for model lists (models and exclude_models name model keys, endpoints and exclude_endpoints name endpoint ids), and 5 only when exclude_models or exclude_endpoints hold \"*\" wildcards or the rule has except_models or except_endpoints.",
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "scope": {
                    "additionalProperties": false,
                    "description": "Use org for organization-wide scope; projects requires project_uuids. IDs must belong to the caller's organization. roles (role_names) and members (member_uuids) are only for comply budget rules: a monthly cap on each member's personal-key spend, where a member's own cap wins over their role's.",
                    "properties": {
                      "member_uuids": {
                        "description": "User UUIDs of organization members for a members scope.",
                        "items": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "project_uuids": {
                        "items": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "role_names": {
                        "description": "Role names (built-in or the organization's custom roles) for a roles scope.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "type": {
                        "enum": [
                          "org",
                          "projects",
                          "roles",
                          "members"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "scope",
                  "config"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementControlRule"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Idempotent replay: current state of the previously created rule."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementControlRule"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "plan_required"
                          ],
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "payment_required"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The rule's kind is a Control Plane feature (`observe`, `route`, `guard`, `comply`) and the organization's plan does not include it. The message names the kind and the current plan. Reading and deleting rules is not plan gated."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    },
                    "file_count": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Conflicting rule, changed idempotency payload, deleted original rule, policy invariant, or explicit file-deletion acknowledgement required."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create a control rule",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/controls/rules/{uuid}": {
      "delete": {
        "description": "Deletes a rule and stops its enforcement; inherited rules still apply. Requires the `controls:write` scope.",
        "operationId": "deleteManagementControlRule",
        "parameters": [
          {
            "description": "Rule id",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Delete a control rule",
        "tags": [
          "Management"
        ]
      },
      "patch": {
        "description": "Updates name, enabled, config or schema_version; omit fields to keep them and use name:null to clear a name. Config is replaced, not merged. ID, kind and scope are immutable. An empty update is rejected. Requires the `controls:write` scope.",
        "operationId": "updateManagementControlRule",
        "parameters": [
          {
            "description": "Rule id",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "config": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "description": "Spending cap that resets per period (day, week or month) or holds in total. At most one enabled budget per target; a project, role or member cap cannot exceed an organization cap of the same period. The server enforces cross-rule constraints when saving.",
                        "properties": {
                          "alerts_enabled": {
                            "description": "Alert preference stored with the budget rule.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "counted_from": {
                            "description": "Where a total cap counts spend from; omitted means the rule's creation. Set it to now to reset a total cap.",
                            "format": "date-time",
                            "type": "string"
                          },
                          "monthly_limit_cents": {
                            "description": "Cap per period in integer USD cents: 100 cents = $1; 1000 = $10; 10000 = $100. Zero is a zero-dollar cap, not unlimited. Named for the monthly period it once always was; it is the cap for whichever period is set.",
                            "minimum": 0,
                            "type": "integer",
                            "x-currency": "USD",
                            "x-unit": "cents"
                          },
                          "period": {
                            "description": "When the cap resets: day (00:00 UTC), week (Monday 00:00 UTC), month (with the billing period), or total (never; counts from counted_from). Omitted means month.",
                            "enum": [
                              "day",
                              "week",
                              "month",
                              "total"
                            ],
                            "type": "string"
                          },
                          "soft_limit_pct": {
                            "description": "Warning threshold as a percentage of the cap; 80 means 80%. Zero or omission means unset.",
                            "maximum": 100,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": {
                            "const": "budget",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "monthly_limit_cents"
                        ],
                        "title": "comply.budget",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Constrain models, provider companies/routes, locations, makers, and upstream data handling. Omitted/empty categories impose no restriction; configured categories combine with AND. Child scopes may only narrow parents; exclusions accumulate and win. Use schema_version=4: models and exclude_models list model keys, endpoints and exclude_endpoints list endpoint ids, and an endpoint is pinned when its model is in models or its id is in endpoints. schema_version=5 adds \"*\" wildcards in exclude_models and exclude_endpoints (exclude_models [\"*deepseek*\"] blocks every DeepSeek model) and except_models / except_endpoints, exceptions that lift the same rule's exclusions only; write 5 only when the rule uses either. Inspect get_allowed_models/inherited policy before applying. Model/provider examples illustrate syntax; use the current catalog to select values.",
                        "properties": {
                          "allowlist": {
                            "additionalProperties": false,
                            "properties": {
                              "custom_models": {
                                "description": "Own custom models (list_custom_models ids) this rule lets through unchecked. Add {id}; on update send back each stored id and fingerprint.",
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fingerprint": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "type": "object"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "endpoints": {
                                "items": {
                                  "description": "Endpoint ids to allow: the id field of a list_models entry, such as gemini/gemma-4-31b. Pins one endpoint and no other of its model. With models it is one pin list: an endpoint is allowed when its model is in models or its id is here, and the other categories allow it.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_endpoints": {
                                "items": {
                                  "description": "Schema_version 5. Endpoint ids or \"*\" patterns this rule's exclusions do not deny, as except_models but per endpoint.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_models": {
                                "items": {
                                  "description": "Schema_version 5. Model keys or \"*\" patterns this rule's exclude_models and exclude_endpoints do not deny: exclude_models [\"*deepseek*\"] with except_models [\"deepseek-v4\"] blocks every DeepSeek model but that one. Lifts nothing another rule excludes and pins nothing. Each entry must except something the rule excludes.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_endpoints": {
                                "items": {
                                  "description": "Endpoint ids to deny: the id field of a list_models entry, such as gemini/gemma-4-31b. From schema_version 5 an entry may hold \"*\" wildcards. Exclusions accumulate down scopes and override allowlists.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_models": {
                                "items": {
                                  "description": "Model keys to deny on every provider: the model field of a list_models entry. From schema_version 5 an entry may hold \"*\" for any characters (\"*deepseek*\"); a wildcard must match a catalog model when saved. Exclusions accumulate down scopes and override allowlists. Do not include and exclude the same model.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "handling": {
                                "additionalProperties": false,
                                "properties": {
                                  "cache_scopes": {
                                    "items": {
                                      "enum": [
                                        "api_key",
                                        "organization",
                                        "shared"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "caching": {
                                    "items": {
                                      "enum": [
                                        "explicit",
                                        "implicit",
                                        "none"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "human_review": {
                                    "items": {
                                      "enum": [
                                        "human_can_view",
                                        "none",
                                        "signals_only"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "logging": {
                                    "items": {
                                      "enum": [
                                        "abuse_monitoring",
                                        "limited_debug",
                                        "none",
                                        "other"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "max_retention_days": {
                                    "description": "Maximum upstream provider content-retention days, separate from Opper storage retention. Zero requires no upstream retention; null/omission imposes no cap.",
                                    "minimum": 0,
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "x-unit": "days"
                                  },
                                  "moderation": {
                                    "items": {
                                      "enum": [
                                        "default_on",
                                        "mandatory",
                                        "none",
                                        "optional"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "subprocessors_read_content": {
                                    "description": "False requires that subprocessors do not read content; null/omission does not consult the category.",
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  },
                                  "training": {
                                    "items": {
                                      "enum": [
                                        "no",
                                        "yes"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "maker": {
                                "additionalProperties": false,
                                "properties": {
                                  "jurisdiction": {
                                    "items": {
                                      "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                      "enum": [
                                        "AE",
                                        "AR",
                                        "AT",
                                        "AU",
                                        "BE",
                                        "BG",
                                        "BH",
                                        "BR",
                                        "CA",
                                        "CH",
                                        "CL",
                                        "CN",
                                        "CY",
                                        "CZ",
                                        "DE",
                                        "DK",
                                        "EE",
                                        "EEA",
                                        "EG",
                                        "ES",
                                        "EU",
                                        "FI",
                                        "FR",
                                        "GB",
                                        "GLOBAL",
                                        "GR",
                                        "HK",
                                        "HR",
                                        "HU",
                                        "ID",
                                        "IE",
                                        "IL",
                                        "IN",
                                        "IS",
                                        "IT",
                                        "JP",
                                        "KE",
                                        "KR",
                                        "KW",
                                        "LI",
                                        "LT",
                                        "LU",
                                        "LV",
                                        "MT",
                                        "MX",
                                        "MY",
                                        "NG",
                                        "NL",
                                        "NO",
                                        "NZ",
                                        "PH",
                                        "PL",
                                        "PT",
                                        "QA",
                                        "RO",
                                        "RS",
                                        "SA",
                                        "SE",
                                        "SG",
                                        "SI",
                                        "SK",
                                        "TH",
                                        "TR",
                                        "TW",
                                        "UA",
                                        "US",
                                        "VN",
                                        "ZA"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "name": {
                                    "items": {
                                      "description": "Slug of the company that trained the weights.",
                                      "minLength": 1,
                                      "pattern": "^\\S(?:.*\\S)?$",
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "models": {
                                "items": {
                                  "description": "Model keys to allow: the model field of a list_models entry, such as gemma-4-31b. A key admits every endpoint of that model the other categories allow. Verify the resulting callable ids with get_allowed_models.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "provider": {
                                "additionalProperties": false,
                                "properties": {
                                  "locations": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "inference": {
                                        "additionalProperties": false,
                                        "description": "Where inference runs. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "jurisdiction": {
                                        "additionalProperties": false,
                                        "description": "The provider's ultimate parent's legal home, separate from inference/storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "storage": {
                                        "additionalProperties": false,
                                        "description": "Where upstream retained content is stored. A route retaining no content satisfies storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "name": {
                                    "additionalProperties": false,
                                    "description": "Provider company public slugs, not adapter keys. Do not include and exclude the same company.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "route": {
                                    "additionalProperties": false,
                                    "description": "Individual catalog service-route IDs. Do not include and exclude the same route.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "type": {
                            "const": "allowlist",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "allowlist"
                        ],
                        "title": "comply.allowlist",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Opper storage retention, separate from upstream provider retention in allowlist.handling.max_retention_days. The strictest enabled org/project retention wins. Files the customer stores explicitly (uploads, store: true) are outside retention and are never deleted by it.",
                        "properties": {
                          "retention_days": {
                            "description": "0–30 days. Zero enables zero-day storage retention. Null/omission contributes no retention cap.",
                            "maximum": 30,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "days"
                          },
                          "type": {
                            "const": "retention",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "comply.retention",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Response caching is switched by the outer rule's enabled flag.",
                        "properties": {
                          "ttl_seconds": {
                            "default": 3600,
                            "description": "Cache lifetime in seconds. Null/omission uses the server default; zero is invalid.",
                            "maximum": 3600,
                            "minimum": 60,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "seconds"
                          },
                          "type": {
                            "const": "cache",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "route.cache",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Order a bare model's provider pool. Custom CEL keys are compiled on save and sort ascending over model.cost, model.ttft and model.throughput. Presets need no expression.",
                        "else": {
                          "not": {
                            "required": [
                              "expression"
                            ]
                          }
                        },
                        "if": {
                          "properties": {
                            "order": {
                              "const": "custom",
                              "type": "string"
                            }
                          },
                          "required": [
                            "order"
                          ]
                        },
                        "properties": {
                          "expression": {
                            "description": "CEL sort key; only valid when order=custom.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "order": {
                            "enum": [
                              "cost",
                              "latency",
                              "throughput",
                              "weighted",
                              "custom"
                            ],
                            "type": "string"
                          },
                          "type": {
                            "const": "pool_order",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "order"
                        ],
                        "then": {
                          "required": [
                            "expression"
                          ]
                        },
                        "title": "route.pool_order",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Match with Go regular expressions, compiled on save. Exceptions let a match through when the matched text contains a match of one of them (Go regex has no lookaround). Use the outer rule scope, not embedded scope or identity. An empty patterns list is an inert draft.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "regex",
                            "type": "string"
                          },
                          "exceptions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save. A pattern match that contains a match of it is let through: not flagged, blocked or redacted.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "patterns": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "patterns"
                        ],
                        "title": "guard.regex",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate a natural-language guard prompt. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "llm",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "prompt": {
                            "description": "Natural-language check performed by the guard.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "prompt"
                        ],
                        "title": "guard.llm",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Score the text against categories with a decision model (catalog type evaluation): one true-or-false question per category, fired when a category's probability reaches its threshold. Fast and cheap; flags or blocks but cannot redact. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "categories": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "description": "Custom category name, reported in findings.",
                                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                                  "type": "string"
                                },
                                "preset": {
                                  "description": "A category Opper maintains. Takes no name or statement.",
                                  "enum": [
                                    "jailbreak",
                                    "pii",
                                    "prompt_injection",
                                    "toxicity"
                                  ],
                                  "type": "string"
                                },
                                "statement": {
                                  "description": "Custom category: a sentence that is true when the text should be caught.",
                                  "maxLength": 1000,
                                  "type": "string"
                                },
                                "threshold": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 1,
                                  "type": "number"
                                }
                              },
                              "type": "object"
                            },
                            "maxItems": 16,
                            "minItems": 1,
                            "type": "array"
                          },
                          "engine": {
                            "const": "decision",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "model": {
                            "description": "Decision model (catalog type evaluation). Omit for the server's default ladder.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "on_error": {
                            "default": "allow",
                            "description": "What the guard does when no model answers.",
                            "enum": [
                              "allow",
                              "block"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "description": "Default threshold for categories without their own; omit to use each preset's.",
                            "exclusiveMinimum": 0,
                            "maximum": 1,
                            "type": "number"
                          }
                        },
                        "required": [
                          "engine",
                          "categories"
                        ],
                        "title": "guard.decision",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate sampled generations with the server's Controls judge. Sampling rate is one in N, not a percentage. Each matching rule produces an independent evaluation. Use the outer rule's enabled flag and scope.",
                        "if": {
                          "properties": {
                            "score_type": {
                              "const": "binary",
                              "type": "string"
                            }
                          },
                          "required": [
                            "score_type"
                          ]
                        },
                        "properties": {
                          "criteria": {
                            "description": "Evaluation rubric. Required for binary scoring; omit for the default score rubric.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "evaluators": {
                            "description": "Uses the server's Controls judge; client model tiers are not configurable.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "type": {
                                  "const": "judge",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "type": "object"
                            },
                            "maxItems": 1,
                            "minItems": 1,
                            "type": "array"
                          },
                          "sampling": {
                            "oneOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "strategy": {
                                    "const": "all",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "rate": {
                                    "default": 10,
                                    "description": "Evaluate 1 in N generations. rate=10 is about 10%; rate=100 is about 1%.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "rate",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "base_rate": {
                                    "default": 100,
                                    "description": "Evaluations per window before adaptive throttling.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "adaptive",
                                    "type": "string"
                                  },
                                  "window": {
                                    "default": "1h",
                                    "enum": [
                                      "1h",
                                      "24h"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "score_type": {
                            "default": "score",
                            "enum": [
                              "score",
                              "binary"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "default": 0.5,
                            "description": "Scores below this value are flagged. Omission or zero uses 0.5. Binary scoring flags a zero verdict.",
                            "maximum": 1,
                            "minimum": 0,
                            "type": "number"
                          }
                        },
                        "required": [
                          "evaluators"
                        ],
                        "then": {
                          "required": [
                            "criteria"
                          ]
                        },
                        "title": "observe",
                        "type": "object"
                      }
                    ],
                    "description": "Config for the rule kind. Replaces the full config on update. Read existing rules and get_rule_vocabulary before changing it; organization constraints remain in force. For an allowlist, its description says which schema_version to write. Opper retention_days and upstream handling.max_retention_days are separate controls."
                  },
                  "confirm_file_deletion": {
                    "description": "Deprecated and ignored: no rule deletes stored files.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "description": "Whether the rule is enforced. Omitted on create means false.",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Display name; null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "schema_version": {
                    "description": "Config schema version. Omit on create for version 1. Version 2 comply allowlists identify providers by company slug. Use 4 for model lists (models and exclude_models name model keys, endpoints and exclude_endpoints name endpoint ids), and 5 only when exclude_models or exclude_endpoints hold \"*\" wildcards or the rule has except_models or except_endpoints.",
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementControlRule"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "plan_required"
                          ],
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "payment_required"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The rule's kind is a Control Plane feature (`observe`, `route`, `guard`, `comply`) and the organization's plan does not include it. The message names the kind and the current plan. Reading and deleting rules is not plan gated."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    },
                    "file_count": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Either a rule with this id already exists, or a concurrent update changed the rule (re-read and retry)."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Update a control rule",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/custom-models": {
      "get": {
        "description": "Reads stored BYOK custom-model metadata in the calling organization without decrypting credentials, returning connection configuration, or calling a provider. identifier is the stored legacy identifier, not a resolved catalog route; provider and type are nullable legacy labels. credential_present indicates a nonempty stored credential, not validity or model availability. Inventory remains readable when BYOK is disabled. Requires the `custom_models:read` scope. Results are ordered by immutable internal ID; pagination is not a snapshot across requests.",
        "operationId": "listManagementCustomModels",
        "parameters": [
          {
            "description": "Number of entries to skip; defaults to 0. Decimal ASCII digits only, supplied at most once.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Maximum entries to return; defaults to 100.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementCustomModelMetadata"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "properties": {
                        "limit": {
                          "maximum": 100,
                          "minimum": 1,
                          "type": "integer"
                        },
                        "offset": {
                          "maximum": 2147483647,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "total_count": {
                          "description": "Total live custom models in the calling organization.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "total_count",
                        "offset",
                        "limit"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the custom_models:read scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The custom model or calling organization is missing or deleted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List custom-model metadata",
        "tags": [
          "Management"
        ]
      },
      "post": {
        "description": "Creates one organization-scoped OpenAI LLM custom model using the default OpenAI endpoint, with an encrypted provider credential and a durable creation receipt. Only name, identifier, credential and idempotency_key are accepted; each is required and non-null. Unknown, duplicate, differently cased fields, trailing JSON, query parameters and bodies over 16384 bytes are refused. No provider request is made: creation does not verify credential validity, model availability, eligibility or funding. No extra configuration, custom endpoints, existing-model edits or deletes are exposed. Requires the `custom_models:write` scope. A new creation returns 201; identical completed retries return current metadata with 200 and idempotency_replayed=true, without creating another model or encrypting again. Changed input for the same operation key returns 409. After an uncertain response, recover the original operation with GET /custom-models/operations/{idempotency_key}; never use a new key just to retry. Receipts are scoped to this organization and management-key identity, surviving token rotation but not shared with another key. If the original model was deleted, POST refuses recreation with 409; GET reports resource_exists=false. Both request and credential fingerprint configuration must be preserved to retry POST across server-key changes; pure recovery does not require resending the credential or the original fingerprint key.",
        "operationId": "createManagementCustomModel",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementCustomModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelMetadata"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementCustomModelCreation"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Identical completed operation replay; current secret-free model metadata and the original receipt."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelMetadata"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementCustomModelCreation"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The key lacks custom_models:write, or the organization cannot admit a new BYOK definition."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No completed creation receipt exists for this management key and organization."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "An operation key was reused with changed input, a name conflicts, or the original model no longer exists. Recover the original operation before starting another intent."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable receipt admission limit reached; existing operations remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Creation storage, credential encryption or fingerprint configuration is unavailable. Recover with the same operation key after an uncertain result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create an OpenAI custom model",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/custom-models/creations": {
      "post": {
        "description": "Opt-in creation of a default-endpoint OpenAI LLM definition and an actor-bound durable receipt containing initial_change_token from the complete definition captured in the same creation transaction. Requires the `custom_models:write` scope. Accepts exactly the same four required non-null strings name, identifier, credential and idempotency_key as metadata-only creation; unknown, duplicate, differently cased fields, trailing JSON, query parameters and bodies over 16384 bytes are refused. This endpoint uses a separate receipt namespace: existing POST /custom-models and GET /custom-models/operations receipts remain unchanged and cannot recover these operations. A new operation returns 201; an identical completed replay returns 200/current metadata plus the original initial_change_token, never a fresh validator. Changed input returns 409; replay never overwrites later edits or recreates a deleted definition. Compare the original validator with a separate state read before accepting its current complete definition as the creation result. A later hidden credential/configuration edit can change complete state while visible metadata remains unchanged. The original token may be stale after a later edit or signing-key rotation and is not itself write authority. No credential, raw extras or private request fingerprint is returned, and no provider request or inference is made.",
        "operationId": "createManagementCustomModelWithState",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementCustomModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelMetadata"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementCustomModelCreationState"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Identical completed replay; current metadata and the immutable original state proof."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelMetadata"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementCustomModelCreationState"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The key lacks custom_models:write or the organization cannot admit a new BYOK definition."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No completed stateful creation receipt exists for this management-key identity and organization."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The operation key has different input, a name conflicts, or the original definition is absent. Recover the original operation before another intent."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable receipt admission limit reached; existing completed operations remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Storage, encryption, fingerprint signing or mutation admission is unavailable. Recover the original operation after an uncertain response."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create an OpenAI custom model with original state proof",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/custom-models/creations/{idempotency_key}": {
      "get": {
        "description": "Pure read of this management key's completed stateful creation receipt in its live organization. Requires the `custom_models:write` scope; no inventory grant is needed. Returns the original UUID, current resource_exists and the immutable initial_change_token captured at creation, even after hidden edits, deletion or server signing-key rotation. It does not refresh or re-sign the validator; a stale original token must not be silently replaced by current state. Recovery does not create a model or receipt, encrypt/decrypt a credential, call a provider or return raw extras. Works without cipher or fingerprint configuration and when BYOK is disabled. Receipts are isolated from legacy creation receipts and from other management-key identities/organizations; missing or foreign receipts return 404. Token rotation within the same management-key identity preserves access. No query parameters are accepted.",
        "operationId": "getManagementCustomModelCreationState",
        "parameters": [
          {
            "description": "Original operation identity in the opt-in stateful-creation namespace.",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelCreationState"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The key lacks custom_models:write or the organization cannot admit a new BYOK definition."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No completed stateful creation receipt exists for this management-key identity and organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Storage, encryption, fingerprint signing or mutation admission is unavailable. Recover the original operation after an uncertain response."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Recover original custom-model creation state",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/custom-models/operations/{idempotency_key}": {
      "get": {
        "description": "Pure read of this management key's completed creation receipt in the calling organization. Requires the `custom_models:write` scope; no custom_models:read grant is needed. Returns the original custom-model UUID plus its current resource_exists status, including false after deletion. It does not create or modify a model, return credentials or connection configuration, encrypt/decrypt, or call a provider. Works without creation cipher/fingerprint configuration and when BYOK is disabled. No query parameters are accepted. A missing or another key's receipt returns 404. Token rotation under the same management key preserves recovery; a replacement management-key identity cannot recover it.",
        "operationId": "getManagementCustomModelCreation",
        "parameters": [
          {
            "description": "Original creation operation identity, scoped to this management key and organization.",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelCreation"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The key lacks custom_models:write, or the organization cannot admit a new BYOK definition."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No completed creation receipt exists for this management key and organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Creation storage, credential encryption or fingerprint configuration is unavailable. Recover with the same operation key after an uncertain result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Recover a custom-model creation",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/custom-models/update-operations/{idempotency_key}": {
      "get": {
        "description": "Pure read of this management key's completed custom-model update receipt in its live organization. Requires the `custom_models:update` scope; no inventory grant is required. Returns original UUID, current resource_exists and result_matches_current_state: true or false when the signing key can compare the complete current snapshot, null when signing configuration is absent or changed, and false for a deleted resource. A completed receipt records the historical commit; it never restores the original result, reapplies a rotation or recreates a deleted definition. Does not return metadata snapshots, credentials, raw extras, tokens or private fingerprints. It needs no cipher, resubmitted credential or original fingerprint key and remains available when BYOK is disabled. Missing, foreign-organization or another management key's receipts return 404. Token rotation of the same management-key identity preserves recovery. No query parameters are accepted.",
        "operationId": "getManagementCustomModelUpdateOperation",
        "parameters": [
          {
            "description": "Original update operation key, bound to this management-key identity and organization.",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelUpdateOperation"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The key lacks custom_models:update or the organization cannot admit BYOK updates."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The calling organization, model or actor-bound update receipt does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Update storage, credential encryption, fingerprint configuration or mutation admission is unavailable. Recover the same operation after an uncertain result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Recover a custom-model update",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/custom-models/{uuid}": {
      "delete": {
        "description": "Deletes this organization's custom-model definition only when expected_change_token matches its complete current stored snapshot. Requires the `custom_models:delete` scope. The create-only custom_models:write grant does not authorize deletion. Accepts exactly one non-null expected_change_token string; unknown, duplicate, differently cased fields, trailing JSON, query parameters and bodies over 1024 bytes are refused. A changed live model returns 409; read state and decide again. A model already absent from a live organization returns empty 204 after syntactic validation, including an identical retry after an uncertain response; this does not establish which actor deleted it. UUIDs are immutable. No operation receipt or idempotency key is used. Available when BYOK is disabled for cleanup. No provider request is made. Existing per-process runtime caches may retain definitions for up to 60 seconds; deletion is not immediate credential revocation.",
        "operationId": "deleteManagementCustomModel",
        "parameters": [
          {
            "description": "Canonical nonzero custom-model UUID in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteManagementCustomModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The management key lacks the operation's scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The calling organization or requested state does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The live custom model changed since the supplied snapshot. Read state before deciding to retry."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Snapshot signing, storage or mutation admission is unavailable."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Delete a custom model conditionally",
        "tags": [
          "Management"
        ]
      },
      "get": {
        "description": "Reads stored BYOK custom-model metadata in the calling organization without decrypting credentials, returning connection configuration, or calling a provider. identifier is the stored legacy identifier, not a resolved catalog route; provider and type are nullable legacy labels. credential_present indicates a nonempty stored credential, not validity or model availability. Inventory remains readable when BYOK is disabled. Requires the `custom_models:read` scope.",
        "operationId": "getManagementCustomModel",
        "parameters": [
          {
            "description": "Custom-model UUID in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelMetadata"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the custom_models:read scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The custom model or calling organization is missing or deleted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get custom-model metadata",
        "tags": [
          "Management"
        ]
      },
      "patch": {
        "description": "Updates only a supported default-endpoint OpenAI LLM definition with empty extras and an existing stored credential. Requires the separate `custom_models:update` scope; the create-only custom_models:write grant does not authorize edits or rotation. Requires expected_change_token and idempotency_key plus at least one non-null name, identifier or credential. Omitted fields are preserved; credentials cannot be cleared. Unknown, duplicate, differently cased fields, trailing JSON, query parameters and bodies over 16384 bytes are refused. No provider request is made. A new credential is encrypted without decrypting the existing one. The complete stored snapshot is rechecked under a row lock; a stale token returns 409. The update, secret-free audit and durable actor-bound receipt commit atomically. Unchanged metadata without a credential still completes a receipt but does not rewrite the model or audit a change. Returns the historical completed operation receipt, not a promise the result is still current. Identical completed retries never reapply a rotation or overwrite a later edit, even after deletion or BYOK disablement. Changed input under the same operation identity returns 409. Preserve original request and fingerprint configuration for PATCH replay; use GET /custom-models/update-operations/{idempotency_key} for pure recovery without resending credentials. Existing runtime lookup caches retain their 60-second propagation window. Upstream credentials are not revoked and references are not repaired.",
        "operationId": "updateManagementCustomModel",
        "parameters": [
          {
            "description": "Exact canonical nonzero custom-model UUID in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateManagementCustomModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelUpdateOperation"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The key lacks custom_models:update or the organization cannot admit BYOK updates."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The calling organization, model or actor-bound update receipt does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The reviewed state changed, the existing definition is unsupported, the name conflicts, or the operation key was used with different input. Recover the original intent or review state; do not refresh and retry automatically."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable receipt limit reached. Existing operations remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Update storage, credential encryption, fingerprint configuration or mutation admission is unavailable. Recover the same operation after an uncertain result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Update an OpenAI custom model conditionally",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/custom-models/{uuid}/state": {
      "get": {
        "description": "Reads the same eight stored metadata fields as inventory plus an opaque change_token in meta. The token covers the complete private stored snapshot without exposing credentials or connection settings; it is not write authority. Requires the `custom_models:read` scope. No query parameters are accepted. No credential decryption or provider request is made. Signing-key rotation invalidates existing tokens; read state again before a later mutation. Inventory GET responses remain unchanged.",
        "operationId": "getManagementCustomModelState",
        "parameters": [
          {
            "description": "Canonical nonzero custom-model UUID in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementCustomModelMetadata"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "change_token": {
                          "maxLength": 48,
                          "minLength": 48,
                          "pattern": "^cmv1_[A-Za-z0-9_-]{43}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "change_token"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The management key lacks the operation's scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The calling organization or requested state does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Snapshot signing, storage or mutation admission is unavailable."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Read guarded custom-model state",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes": {
      "get": {
        "description": "Lists routes in the calling organization, including whether drafts differ from the deployed version. Requires the `dynamic_routes:read` scope. meta.default_classifier_chain is the model chain a classifier uses when it does not pin one. meta.default_first_token_timeout_ms is the first-token timeout a model or pool node runs on when its arguments state none.",
        "operationId": "listManagementDynamicRoutes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DynamicRoute"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List dynamic routes",
        "tags": [
          "Management"
        ]
      },
      "post": {
        "description": "Creates a route draft. Omit graph to seed a complete default graph, then use data.draft.graph as a starting point. Empty graphs are invalid. Omit deploy or set deploy=false to keep the route unpublished; deploy=true changes live routing immediately. Review data.draft.validation, save changes with update_dynamic_route_draft, then use simulate_dynamic_route without version_number to test the draft before deploy_dynamic_route. Optional display_name is a human label separate from the route identifier; it preserves case and spaces. Invoke a deployed route with model=dynamic/\u003cname\u003e; invocation_model contains the exact string. Requires the `dynamic_routes:write` scope.\n\nGraph format: an object with an `elements` array. Each element has a unique `id`, a `type`, optional `properties`, and `outputs`, an object mapping output names to `{\"elementId\":\"target-node-id\"}`. Include `id: START, type: start` and `id: END, type: end`; `input` and `output` are not node types. A minimal deployable graph (replace the model with an available catalog ID permitted by your policy):\n```json\n{\"elements\":[{\"id\":\"START\",\"type\":\"start\",\"outputs\":{\"next\":{\"elementId\":\"primary\"}}},{\"id\":\"primary\",\"type\":\"model\",\"properties\":{\"model\":\"cerebras/gpt-oss-120b\"},\"outputs\":{\"success\":{\"elementId\":\"END\"},\"fallback\":{\"elementId\":\"END\"}}},{\"id\":\"END\",\"type\":\"end\",\"outputs\":{}}]}\n```\n\nSupported node types and properties:\n- `start`: the START node; `outputs.next` selects the first node.\n- `end`: the END node; `outputs` is `{}`.\n- `model`: `properties.model` is a catalog model ID. `outputs.success` targets END or an observe node; `outputs.fallback` targets another model, pool, or END.\n- `pool`: `properties.models` contains 2-10 `{model,metrics}` candidates; `properties.expression` is a numeric CEL expression such as `model.cost`, sorted ascending. Uses the same success/fallback outputs as model.\n- `conditional`: `properties.cases` contains `{id,expression}` entries; each expression is a CEL predicate over `metadata`, `auth`, and `input`. Connect an output for each case ID and a `default` output. The first true case wins.\n- `percentage`: `properties.buckets` contains at least two `{id,weight}` entries with positive integer weights totaling 100. Connect an output for each bucket ID.\n- `classifier`: `properties.cases` contains 2-10 `{id,label,instructions}` entries with unique labels, plus optional `context` and `model` properties. Connect an output per case ID; no default output. Classification failures fail the route.\n- `observe`: `properties.criteria` defines an asynchronous evaluation, with optional `score_type` (`score` or `binary`), `model`, `threshold`, and `sample_rate` (both greater than 0 and at most 1). Place after model/pool success or another observe node; `outputs.next` leads to another observe node or END.\n\nGraphs must be acyclic. Every node except END accepts at most one incoming edge; use separate model nodes on separate branches. Deployment requires each path from START to reach a model or pool before END. The route name is the model identifier on chat completions, responses, messages and native calls.",
        "operationId": "createManagementDynamicRoute",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A route with this name already exists in the organization."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create a dynamic route",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}": {
      "delete": {
        "description": "Soft-deletes the route. Calls to `dynamic/\u003cname\u003e` fail from the next request on. Requires the `dynamic_routes:write` scope.",
        "operationId": "deleteManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Delete a dynamic route",
        "tags": [
          "Management"
        ]
      },
      "get": {
        "description": "Returns the route, draft graph, validation issues and active version. Requires the `dynamic_routes:read` scope.",
        "operationId": "getManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get a dynamic route",
        "tags": [
          "Management"
        ]
      },
      "patch": {
        "description": "Updates current route presentation metadata without validating or changing the draft graph, incrementing its revision, or deploying a version. display_name preserves case, spaces and Unicode; boundary whitespace is trimmed. Empty clears the label; omission, null, control characters, unknown fields and labels longer than 128 characters are rejected. The route identifier and invocation_model are unchanged. Restore and rollback preserve the current label. Requires the `dynamic_routes:write` scope.",
        "operationId": "updateManagementDynamicRouteMetadata",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteMetadataRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Update a dynamic route's display name",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/deploy": {
      "post": {
        "description": "Validates the row-locked current draft and deploys it as a new immutable version, changing live routing. Optional expected_route_uuid, expected_draft_revision and expected_active_version_number bind the operation to the reviewed identity, draft and live pointer; zero active version means unpublished. A mismatch returns 409. Supply a fresh idempotency_key for each new deployment and reuse identical arguments only to retry that operation. A replay returns the original version in meta.deployed_version and current observational data without reactivating the original version or validating a later draft. meta.idempotency_replayed identifies replays. The receipt can also be recovered by the read-only deployments/{idempotency_key} endpoint. Requires the `dynamic_routes:write` scope.",
        "operationId": "deployManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteDeployRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A route identity, draft or live pointer precondition failed; the operation key conflicts with a different request; or the original route was deleted and recreated."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain replayable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Deploy the draft",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/deployments": {
      "post": {
        "description": "Fail-closed deployment contract for infrastructure clients. expected_route_uuid (nonzero), expected_draft_revision, expected_active_version_number and idempotency_key are all required. Validates the row-locked reviewed draft and publishes one immutable version only if the reviewed identity and live pointer still match. Zero active version means unpublished. Missing preconditions are rejected before mutation. The separate path is absent on older backends, so clients must not fall back to /deploy when it is unavailable. Reusing identical arguments and the same key returns the original version without reactivating it; use a fresh key for every new deployment. meta.deployed_version is the original affected version and data is current observational state. Requires the `dynamic_routes:write` scope.",
        "operationId": "createManagementDynamicRouteDeployment",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteCreateDeploymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A reviewed route identity, draft or active pointer changed; the operation key conflicts; or the original route was replaced."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached; existing operations remain replayable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create a guarded route deployment",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/deployments/{idempotency_key}": {
      "get": {
        "description": "Pure read of a completed deployment operation belonging to the same organization and authenticated actor. Returns the original immutable version in meta.deployed_version and the current observational route detail in data; it never activates a version, changes a draft or creates a receipt. Returns 404 when no matching completed receipt exists; a deleted-and-recreated route identity returns 409. Requires the `dynamic_routes:read` scope.",
        "operationId": "getManagementDynamicRouteDeployment",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Deployment operation identifier",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The receipt belongs to a different route identity."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Read a deployment operation receipt",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/draft": {
      "put": {
        "description": "Saves draft changes without deploying. Omitted description, graph and layout are preserved; an empty description clears it. Supply the complete graph to replace it. Structural errors reject the save; inspect meta.issues and data.draft.validation for remaining issues before deployment. Use simulate_dynamic_route without version_number to test the saved draft; deploy_dynamic_route performs full deployment validation. Requires the `dynamic_routes:write` scope.\n\nGraph format: an object with an `elements` array. Each element has a unique `id`, a `type`, optional `properties`, and `outputs`, an object mapping output names to `{\"elementId\":\"target-node-id\"}`. Include `id: START, type: start` and `id: END, type: end`; `input` and `output` are not node types. A minimal deployable graph (replace the model with an available catalog ID permitted by your policy):\n```json\n{\"elements\":[{\"id\":\"START\",\"type\":\"start\",\"outputs\":{\"next\":{\"elementId\":\"primary\"}}},{\"id\":\"primary\",\"type\":\"model\",\"properties\":{\"model\":\"cerebras/gpt-oss-120b\"},\"outputs\":{\"success\":{\"elementId\":\"END\"},\"fallback\":{\"elementId\":\"END\"}}},{\"id\":\"END\",\"type\":\"end\",\"outputs\":{}}]}\n```\n\nSupported node types and properties:\n- `start`: the START node; `outputs.next` selects the first node.\n- `end`: the END node; `outputs` is `{}`.\n- `model`: `properties.model` is a catalog model ID. `outputs.success` targets END or an observe node; `outputs.fallback` targets another model, pool, or END.\n- `pool`: `properties.models` contains 2-10 `{model,metrics}` candidates; `properties.expression` is a numeric CEL expression such as `model.cost`, sorted ascending. Uses the same success/fallback outputs as model.\n- `conditional`: `properties.cases` contains `{id,expression}` entries; each expression is a CEL predicate over `metadata`, `auth`, and `input`. Connect an output for each case ID and a `default` output. The first true case wins.\n- `percentage`: `properties.buckets` contains at least two `{id,weight}` entries with positive integer weights totaling 100. Connect an output for each bucket ID.\n- `classifier`: `properties.cases` contains 2-10 `{id,label,instructions}` entries with unique labels, plus optional `context` and `model` properties. Connect an output per case ID; no default output. Classification failures fail the route.\n- `observe`: `properties.criteria` defines an asynchronous evaluation, with optional `score_type` (`score` or `binary`), `model`, `threshold`, and `sample_rate` (both greater than 0 and at most 1). Place after model/pool success or another observe node; `outputs.next` leads to another observe node or END.\n\nGraphs must be acyclic. Every node except END accepts at most one incoming edge; use separate model nodes on separate branches. Deployment requires each path from START to reach a model or pool before END.",
        "operationId": "updateManagementDynamicRouteDraft",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "issues": {
                          "items": {
                            "$ref": "#/components/schemas/DynamicRouteValidationIssue"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Replace the draft",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/simulate": {
      "post": {
        "description": "Omit version_number or set it to null to simulate the current draft, including an unpublished route. To simulate history, supply a positive version_number from list_dynamic_route_versions. Zero is invalid and does not mean draft. Minimal draft call: {\"name\":\"support\",\"version_number\":null}. Optional input and metadata supply request context; overrides.model_outcomes maps model/pool node IDs to success or fallback, and overrides.classifier_cases maps classifier node IDs to case IDs. For example {\"name\":\"support\",\"version_number\":null,\"overrides\":{\"model_outcomes\":{\"primary\":\"success\"}}} tests the documented example graph. May call a live classifier when no override is provided; does not deploy or invoke the selected final model. Inspect data.status and data.path for the routing verdict. Fix draft issues with update_dynamic_route_draft before deployment. Requires the `dynamic_routes:write` scope.",
        "operationId": "simulateManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteSimulateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteSimulationResult"
                    },
                    "meta": {
                      "properties": {
                        "target": {
                          "description": "What was simulated: {\"kind\":\"draft\"} or {\"kind\":\"version\",\"version_number\":\u003cn\u003e}.",
                          "properties": {
                            "kind": {
                              "enum": [
                                "draft",
                                "version"
                              ],
                              "type": "string"
                            },
                            "version_number": {
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Simulate a request through the route",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/undeploy": {
      "post": {
        "description": "Clears only the current active version pointer. The draft and immutable version history are preserved. Optional expected_route_uuid and expected_active_version_number protect the identity and live pointer; zero means already unpublished. A positive expected version conflicts when the route is now unpublished. Use a fresh idempotency_key per new operation and retry identical arguments only; replays return the original affected version without clearing any newer deployment. data is the current observational route detail. Requires the `dynamic_routes:write` scope.",
        "operationId": "undeployManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteUndeployRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "undeployed_version": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/DynamicRouteVersion"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "undeployed_version_number": {
                          "description": "Original affected version; zero for an already-unpublished no-op.",
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A route identity/live pointer precondition or operation receipt conflicts."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached; existing operations remain replayable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Unpublish a dynamic route",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/versions": {
      "get": {
        "description": "Lists immutable deployed-version summaries for a route. Requires the `dynamic_routes:read` scope.",
        "operationId": "listManagementDynamicRouteVersions",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DynamicRouteVersionSummary"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List a route's versions",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/versions/{version_number}": {
      "get": {
        "description": "Returns a historical deployed version, including its graph and layout. Requires the `dynamic_routes:read` scope.",
        "operationId": "getManagementDynamicRouteVersion",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Version number, from 1",
            "in": "path",
            "name": "version_number",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteVersion"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get a version",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/versions/{version_number}/restore-to-draft": {
      "post": {
        "description": "Replaces the current draft with a historical version without changing live routing. Review the returned draft validation, then simulate the draft by omitting version_number before explicitly deploying. Requires the `dynamic_routes:write` scope.",
        "operationId": "restoreManagementDynamicRouteVersionToDraft",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Version number, from 1",
            "in": "path",
            "name": "version_number",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Copy a version into the draft",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/dynamic-routes/{name}/versions/{version_number}/rollback": {
      "post": {
        "description": "Publishes a historical version as a new deployed version and changes live routing immediately. Returns the new version in meta.deployed_version. Requires the `dynamic_routes:write` scope. The draft is left unchanged.",
        "operationId": "rollbackManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Version number, from 1",
            "in": "path",
            "name": "version_number",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteRollbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Roll back to a version",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/invites": {
      "get": {
        "description": "Lists the organization's invitations. Pass `pending=true` for the unaccepted ones, `pending=false` for the accepted. Requires the `members:read` scope.",
        "operationId": "listManagementInvites",
        "parameters": [
          {
            "description": "true returns only unaccepted invitations, false only accepted ones. Omit for both.",
            "in": "query",
            "name": "pending",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementInvite"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List invitations",
        "tags": [
          "Management"
        ]
      },
      "post": {
        "description": "Invites an address into the organization and emails the invitation. The response carries the acceptance token and link as well, so a caller that would rather deliver it itself can, and `email_sent` reports whether the mail was queued. A live invitation for the same address is resent rather than duplicated: the token stays valid, the expiry moves out, and the reply is 200 instead of 201. Send `idempotency_key` to retry safely after an uncertain result. A replay answers 200 with the same invitation and `meta.idempotency_replayed`, mails nobody and leaves the expiry where it was; the same key with different arguments is 409. Omit it when you mean to resend. `role` is available on Enterprise; elsewhere the invitee joins with the plan's default member role. Treat `token` and `invite_url` as secrets: anyone holding one can join the organization. Requires the `members:write` scope.",
        "operationId": "createManagementInvite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateManagementInviteResponse"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A live invitation for the address was resent (same token, expiry pushed out), or an idempotency_key replay returned the invitation unchanged."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateManagementInviteResponse"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "That address already belongs to a member of the organization, or the idempotency_key was used with different arguments or for an invitation that has since been revoked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The requested role does not belong to this organization."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The organization has reached its durable idempotency-receipt limit. Existing operations can still be retried."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Invite a member",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/invites/{id}": {
      "delete": {
        "description": "Deletes an invitation, so its link stops working. Revoking an accepted invitation removes the record of the acceptance, not the membership it produced. Requires the `members:write` scope.",
        "operationId": "revokeManagementInvite",
        "parameters": [
          {
            "description": "Invitation id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Revoke an invitation",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/management-keys/_self/disable": {
      "post": {
        "description": "Emergency revocation for a leaked token: disables the management API key the request authenticated with, and every token under it. Possession of the token is the authorization — no scope is required, and this works regardless of the organization's plan.",
        "operationId": "disableCallingManagementKey",
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Disable the calling management key",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/member-role-operations/{idempotency_key}": {
      "get": {
        "description": "Pure read of this management key's original completed receipt. The original result_change_token is retained after later edits, deletion or signing-key rotation. result_matches_current_state is null if signing configuration cannot compare, false for an absent resource. This read never restores a result or reapplies an operation.  Requires the `member_roles:write` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "getManagementMemberRoleOperation",
        "parameters": [
          {
            "description": "Original actor-bound operation identity.",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRoleOperation"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Recover a member role assignment",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/members": {
      "get": {
        "description": "Lists every member of the calling organization with their effective role, and marks the one member ownership resolves to. Requires the `members:read` scope.",
        "operationId": "listManagementMembers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementMember"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List members",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/members/{user_uuid}": {
      "delete": {
        "description": "Removes the person's membership in the calling organization and revokes the credentials that membership issued: their inference keys in this organization, the OAuth authorizations behind those keys, and their agent connections scoped to it. This is not a user deletion. The account remains, as does everything they hold in any other organization. The organization's owner cannot be removed (409); transfer ownership in the platform first. Requires the `members:write` scope.",
        "operationId": "removeManagementMember",
        "parameters": [
          {
            "description": "Member's user UUID, as listed by GET /management/v1/members",
            "in": "path",
            "name": "user_uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The member is the organization's owner. Transfer ownership before removing them."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Remove a member",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/members/{uuid}/role": {
      "get": {
        "description": "Complete organization-bound snapshots carry opaque change tokens. Preserve reviewed tokens; never silently adopt later observations after a conflict. Reports raw stored assignment and current effective admission facts, including protected owner and directory-managed state. Requires the `member_roles:read` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "getManagementMemberRole",
        "parameters": [
          {
            "description": "Exact canonical nonzero UUID of an existing organization member.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementMemberRole"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Read an existing member role snapshot",
        "tags": [
          "Management"
        ]
      },
      "put": {
        "description": "Complete organization-bound snapshots carry opaque change tokens. Preserve reviewed tokens; never silently adopt later observations after a conflict. Requires an actor-bound idempotency_key. The role mutation, audit and original result proof commit atomically. Identical completed replay returns the current snapshot with its original historical receipt when the resource remains present; it never reapplies the older intent. Changed intent under the same key conflicts. Recover the same receipt after an uncertain response. Requires the exact reviewed member expected_change_token and destination expected_role_change_token. Cannot invite, remove, transfer ownership, assign owner, edit directory-managed membership or bypass protected-owner checks. Requires the `member_roles:write` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "setManagementMemberRole",
        "parameters": [
          {
            "description": "Exact canonical nonzero UUID of an existing organization member.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetManagementMemberRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementMemberRole"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementRoleOperation"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Set an existing member role conditionally",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/organization/balance": {
      "get": {
        "description": "The calling organization's prepaid balance, its spend this billing period (or in its organization budget's current window when one is set, with the budget and what is left of it), and whether its calls are refused right now and why. The same figures `GET /v3/me` shows a key whose owner holds `billing:read`. Each project's own spend and budget are on the projects themselves (`spend`, with `billing:read`). Requires the `billing:read` scope. No query parameters are accepted.",
        "operationId": "getManagementOrganizationBalance",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementOrganizationBalance"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Billing is not configured on this server, or the organization's fraud review could not be read."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get the organization's balance",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/organization/model-list": {
      "get": {
        "description": "Pure read of the calling organization's UUID, its compat_model_list preference (all, simplified, recommended or none) and compat_model_list_dynamic_routes (whether its dynamic routes are listed) and compat_model_list_enforced (whether its API keys can only call what the list shows). With compat_model_list_enforced true the list is also a limit on calls: the organization's API keys (and those of every project that follows it) can only call what it lists, after the rules, and any other LLM or embedding model gets a 403 with details.reason model_list_blocked. Guard checks, observe judges, the models a dynamic route calls, and image, video, audio and custom models are not limited by it. Requires the `controls:read` scope.",
        "operationId": "getManagementOrganizationModelList",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementOrganizationModelList"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the required controls scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The calling organization is missing or deleted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Read the organization's model-list preference",
        "tags": [
          "Management"
        ]
      },
      "put": {
        "description": "Sets compat_model_list (all, simplified, recommended or none), compat_model_list_dynamic_routes (true or false), compat_model_list_enforced (true or false), or any of them; a field left out keeps its value. An empty body, null, unknown, duplicate or invalid fields, oversized bodies and trailing JSON are refused, and so is none with the dynamic routes off, which would list nothing. Changes affect compat listings, and calls when the list is enforced, from the next request. With compat_model_list_enforced true the list is also a limit on calls: the organization's API keys (and those of every project that follows it) can only call what it lists, after the rules, and any other LLM or embedding model gets a 403 with details.reason model_list_blocked. Guard checks, observe judges, the models a dynamic route calls, and image, video, audio and custom models are not limited by it. While a recommended list is enforced it is frozen at the models recommended when it was set, so a model Opper stops recommending stays callable. Repeating the current value makes no audit event. No object, secret or model call is created. There is no conditional-write guarantee: coordinate other writers and use GET after an uncertain response. Requires the `controls:write` scope.",
        "operationId": "setManagementOrganizationModelList",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetManagementOrganizationModelListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementOrganizationModelList"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the required controls scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The calling organization is missing or deleted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Set the organization's model-list preference",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/organization/model-list/projects": {
      "get": {
        "description": "Pure read of the calling organization's live projects that have their own compat model list, by name, with compat_model_list_enforced (whether the project limits its own API keys to that list). A project's own list replaces the organization's for compat model-list responses to that project's API keys; every project not listed here follows the organization's setting, its enforcement included. Requires the `controls:read` scope.",
        "operationId": "listManagementProjectModelLists",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementProjectModelList"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the required controls scope."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List the projects that have their own model list",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects": {
      "get": {
        "description": "Lists every project in the calling organization. Requires the `projects:read` scope.",
        "operationId": "listManagementProjects",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementProject"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List projects",
        "tags": [
          "Management"
        ]
      },
      "post": {
        "description": "Creates a project with Organization access in the calling organization. Requires the `projects:write` scope. For an atomic initial Restricted policy use the dedicated /management/v1/projects/with-access operation; access fields are not accepted here.",
        "operationId": "createManagementProject",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProject"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A project with this name already exists in the organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create a project",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/with-access": {
      "post": {
        "description": "Requires the `projects:write` scope and the `project_access:write` scope on a real management key. Commits the new project, initial Organization or Restricted policy, recipients and audit in one transaction. The project is never visible with an incomplete policy. The access object and its mode, role_keys and user_uuids are required; Organization mode requires empty arrays. Null, aliases, duplicate/unknown fields and trailing JSON are rejected; request bodies are limited to 32768 bytes. Creation is not idempotent: inspect and import an uncertain result before retrying. The dedicated route fails closed on servers without atomic creation; never fall back to metadata-only creation. Initial policy administration is not delegated to OAuth.",
        "operationId": "createManagementProjectWithAccess",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementProjectWithAccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProject"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Recipient not found in this organization, or atomic creation is not supported by this server."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A project with this name already exists in the organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Initial project creation failed or its result is uncertain. Inspect before retrying."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create a project with its initial access policy atomically",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}": {
      "delete": {
        "description": "Soft-deletes the project and permanently deletes every inference key bound to it. Requires the `projects:delete` scope.",
        "operationId": "deleteManagementProject",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Delete a project",
        "tags": [
          "Management"
        ]
      },
      "get": {
        "description": "Fetches one project by UUID. Requires the `projects:read` scope.",
        "operationId": "getManagementProject",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProject"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get a project",
        "tags": [
          "Management"
        ]
      },
      "patch": {
        "description": "Updates a project's name and/or description. Omit a field to leave it unchanged; send `\"description\": null` to clear it. An empty body is rejected. Retention is not settable here — it is a control-plane setting, managed through `/management/v1/controls/rules`. Requires the `projects:write` scope.",
        "operationId": "updateManagementProject",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateManagementProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProject"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A project with this name already exists in the organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Update a project",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/access": {
      "get": {
        "description": "Returns the complete organization-bound policy, canonical role and member recipients, revision and opaque change token. Requires the `project_access:read` scope on a real management key. Existing projects:* scopes and delegated user OAuth grant no access. Reads remain available while writes are disabled. No query parameters are accepted.",
        "operationId": "getManagementProjectAccess",
        "parameters": [
          {
            "description": "Exact canonical nonzero UUID of an existing project in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProjectAccessPolicy"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing dedicated project-access scope or writes are disabled for this organization."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Project or recipient not found in this organization."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed policy or recipient state changed. Review the latest state; do not silently refresh the token and retry."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Project policy state or transaction unavailable."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Read an existing project's access policy",
        "tags": [
          "Management"
        ]
      },
      "put": {
        "description": "Destructively replaces the complete existing-project policy using the exact reviewed expected_change_token. All four fields are required; role_keys and user_uuids must be explicit arrays. Organization mode requires empty recipient lists; Restricted mode can use empty lists. Role and direct member grants form a union, while built-in Owner/Admin retain access. Requires the `project_access:write` scope on a real management key and organization write activation. Read access is granted separately; the committed mutation returns its complete resulting snapshot. No project creation or delegated user editing. No query parameters are accepted. A conflict requires review, not automatic token refresh and retry.",
        "operationId": "replaceManagementProjectAccess",
        "parameters": [
          {
            "description": "Exact canonical nonzero UUID of an existing project in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceManagementProjectAccessPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProjectAccessPolicy"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing dedicated project-access scope or writes are disabled for this organization."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Project or recipient not found in this organization."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed policy or recipient state changed. Review the latest state; do not silently refresh the token and retry."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Project policy state or transaction unavailable."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Replace an existing project's access policy conditionally",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/api-keys": {
      "get": {
        "description": "Lists the inference keys bound to a project. Only the key prefix is returned — the full key is shown once, at creation. Requires the `apikeys:read` scope.",
        "operationId": "listManagementAPIKeys",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementAPIKey"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "List a project's API keys",
        "tags": [
          "Management"
        ]
      },
      "post": {
        "description": "Mints an inference key for the project. The full key is returned only on initial creation when return_secret is not false; the user MCP tool defaults false. Optional `allowed_ips` restricts the key to those addresses. Each entry is an IP address or CIDR range (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only, up to 100 entries, ranges no wider than /8 (IPv4) or /16 (IPv6). An empty list accepts calls from any IP. Calls from any other address get 403 with code `ip_not_allowed`. A change takes up to a minute to apply. Reuse idempotency_key with identical arguments after uncertain results. A replay returns existing metadata without a secret; changed arguments or a deleted key return 409. Requires the `apikeys:write` scope.",
        "operationId": "createManagementAPIKey",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementAPIKey"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Idempotent replay: existing API key metadata without the secret."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateManagementAPIKeyResponse"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The idempotency key was used with different arguments or its API key was deleted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Mint an API key",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/api-keys/{id}": {
      "delete": {
        "description": "Permanently deletes an inference key. Requires the `apikeys:write` scope.",
        "operationId": "deleteManagementAPIKey",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Delete an API key",
        "tags": [
          "Management"
        ]
      },
      "patch": {
        "description": "Changes an inference key. Send `name`, `allowed_ips` or both: a field left out is not changed. `name` renames the key. `allowed_ips` replaces the IP allowlist, and `null` or `[]` clears it. Each entry is an IP address or CIDR range (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only, up to 100 entries, ranges no wider than /8 (IPv4) or /16 (IPv6). An empty list accepts calls from any IP. Calls from any other address get 403 with code `ip_not_allowed`. A change takes up to a minute to apply. A key held by an agent login cannot be renamed or have a list. Requires the `apikeys:write` scope.",
        "operationId": "updateManagementAPIKey",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateManagementAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementAPIKey"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Rename an API key or set its allowed IPs",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/model-list": {
      "delete": {
        "description": "Removes the project's own compat model list, so compat model-list responses to its API keys follow the organization's setting again. Clearing a project that already follows the organization succeeds and makes no audit event. Requires the `controls:write` scope.",
        "operationId": "clearManagementProjectModelList",
        "parameters": [
          {
            "description": "UUID of a live project in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the required controls scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The project is missing, deleted or in another organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Make a project follow the organization's model list",
        "tags": [
          "Management"
        ]
      },
      "put": {
        "description": "Gives the project its own compat model list, replacing any it had: compat_model_list (all, simplified, recommended or none) and compat_model_list_dynamic_routes (true or false) are both required, and compat_model_list_enforced (true or false) limits the project's API keys to what the list shows (left out, the project keeps what it had). Compat model-list responses to the project's API keys then follow this list instead of the organization's. While the organization enforces its own list, every project is limited, its keys can only call what both lists show, and a list wider than the organization's is refused. Null, unknown, duplicate or invalid fields, oversized bodies and trailing JSON are refused, and so is none with the dynamic routes off, which would list nothing. Repeating the current value makes no audit event; a change is audited as project.updated. Requires the `controls:write` scope.",
        "operationId": "setManagementProjectModelList",
        "parameters": [
          {
            "description": "UUID of a live project in the calling organization.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetManagementProjectModelListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProjectModelList"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the required controls scope."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The project is missing, deleted or in another organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Give a project its own model list",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/webhook": {
      "get": {
        "description": "The project's webhook: `url`, where an async job or batch (POST /v3/videos, POST /v3/images with `async: true`, POST /v3/batches) submitted without a `callback_url` sends its completion webhook, and the dates of the signing secret. The secret itself is not here (GET .../webhook/secret), and reading this makes no secret. Requires the `apikeys:read` scope.",
        "operationId": "getManagementProjectWebhook",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "previous_secret_valid_until": {
                          "description": "Set for 24 hours after a rotation: until then webhooks also carry a signature made with the previous secret.",
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "secret_created_at": {
                          "description": "When the current signing secret was made; null before the project's first secret.",
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url": {
                          "description": "Where an async job of the project submitted without a `callback_url` sends its webhook; null when the project has none.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url_updated_at": {
                          "description": "When `url` was last set or cleared; null when it never was.",
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "url",
                        "url_updated_at",
                        "secret_created_at",
                        "previous_secret_valid_until"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such project in the calling organization. A project of another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Webhook signing is not configured on this deployment."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get a project's webhook",
        "tags": [
          "Management"
        ]
      },
      "patch": {
        "description": "Sets the project's default webhook URL (`{\"url\": \"https://...\"}`) or clears it (`{\"url\": null}`). The URL goes through the same checks as a job's `callback_url` (400 names the rule it broke). Saving a URL turns the webhook on at once: from then on every async video and image job and every batch of the project that names no `callback_url` sends its signed webhook there. A `callback_url` on the request always wins. Requires the `apikeys:write` scope.",
        "operationId": "updateManagementProjectWebhook",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "url": {
                    "description": "An https URL, or null to clear it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "previous_secret_valid_until": {
                          "description": "Set for 24 hours after a rotation: until then webhooks also carry a signature made with the previous secret.",
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "secret_created_at": {
                          "description": "When the current signing secret was made; null before the project's first secret.",
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url": {
                          "description": "Where an async job of the project submitted without a `callback_url` sends its webhook; null when the project has none.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url_updated_at": {
                          "description": "When `url` was last set or cleared; null when it never was.",
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "url",
                        "url_updated_at",
                        "secret_created_at",
                        "previous_secret_valid_until"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such project in the calling organization. A project of another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Webhook signing is not configured on this deployment."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Set or clear a project's webhook URL",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/webhook/secret": {
      "get": {
        "description": "The secret that signs the project's completion webhooks, made on first read: the same one GET /v3/webhooks/secret returns to the project's API keys. Keep it server-side: whoever holds it can sign a webhook your endpoint accepts. Responses are not cached (`Cache-Control: no-store`). Requires the `apikeys:read` scope.",
        "operationId": "getManagementProjectWebhookSecret",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "previous_valid_until": {
                          "description": "Set after a rotation: until then webhooks also carry a signature made with the previous secret.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "secret": {
                          "description": "`whsec_` and the base64 of the key bytes, the form Standard Webhooks libraries take.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "secret",
                        "created_at"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such project in the calling organization. A project of another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Webhook signing is not configured on this deployment."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get a project's webhook signing secret",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/webhook/secret/rotate": {
      "post": {
        "description": "Replaces the project's signing secret and returns the new one. For 24 hours webhooks carry two signatures, one with the new secret and one with the previous, so your endpoint can switch without dropping a delivery; after that only the new one signs. Rotating again within the 24 hours retires the previous secret at once. Requires the `apikeys:write` scope.",
        "operationId": "rotateManagementProjectWebhookSecret",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "previous_valid_until": {
                          "description": "Set after a rotation: until then webhooks also carry a signature made with the previous secret.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "secret": {
                          "description": "`whsec_` and the base64 of the key bytes, the form Standard Webhooks libraries take.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "secret",
                        "created_at"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such project in the calling organization. A project of another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Webhook signing is not configured on this deployment."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Rotate a project's webhook signing secret",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/projects/{uuid}/webhook/test": {
      "post": {
        "description": "Sends one signed `webhook.test` event to `url` now, signed with the project's secret, to check that the endpoint is reachable and verifies signatures without running a job. The URL goes through the same checks as a job's `callback_url` (400 names the rule it broke). One attempt, no retries: the answer says whether the endpoint took it (`delivered`, a 2xx), its `status_code`, or what went wrong. At most 10 a minute per project (429), shared with POST /v3/webhooks/test. Requires the `apikeys:write` scope.",
        "operationId": "testManagementProjectWebhook",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "url": {
                    "description": "The https URL to POST the test event to.",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "delivered": {
                          "description": "The endpoint answered 2xx.",
                          "type": "boolean"
                        },
                        "duration_ms": {
                          "type": "integer"
                        },
                        "error": {
                          "description": "What went wrong, when not delivered.",
                          "type": "string"
                        },
                        "status_code": {
                          "description": "What the endpoint answered; absent when no answer came.",
                          "type": "integer"
                        },
                        "webhook_id": {
                          "description": "The webhook-id header the event carried.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "delivered",
                        "webhook_id",
                        "duration_ms"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such project in the calling organization. A project of another organization is indistinguishable from one that does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "More than 10 test deliveries in a minute for this project."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Webhook signing is not configured on this deployment."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Send a test webhook for a project",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/role-operations/create/{idempotency_key}": {
      "get": {
        "description": "Pure read of this management key's original completed receipt. The original result_change_token is retained after later edits, deletion or signing-key rotation. result_matches_current_state is null if signing configuration cannot compare, false for an absent resource. This read never restores a result or reapplies an operation.  Requires the `roles:write` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "getManagementRoleCreation",
        "parameters": [
          {
            "description": "Original actor-bound operation identity.",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRoleOperation"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Recover a custom-role creation",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/role-operations/update/{idempotency_key}": {
      "get": {
        "description": "Pure read of this management key's original completed receipt. The original result_change_token is retained after later edits, deletion or signing-key rotation. result_matches_current_state is null if signing configuration cannot compare, false for an absent resource. This read never restores a result or reapplies an operation.  Requires the `roles:write` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "getManagementRoleUpdate",
        "parameters": [
          {
            "description": "Original actor-bound operation identity.",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRoleOperation"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Recover a custom-role update",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/roles": {
      "get": {
        "description": "Complete organization-bound snapshots carry opaque change tokens. Preserve reviewed tokens; never silently adopt later observations after a conflict. Lists custom and built-in roles plus the admin permission ceiling; owner is never assignable. Requires the `roles:read` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "listManagementRoles",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRoleCatalog"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Read organization role catalog",
        "tags": [
          "Management"
        ]
      },
      "post": {
        "description": "Requires an actor-bound idempotency_key. The role mutation, audit and original result proof commit atomically. Identical completed replay returns the current snapshot with its original historical receipt when the resource remains present; it never reapplies the older intent. Changed intent under the same key conflicts. Recover the same receipt after an uncertain response. The server allocates an immutable custom role name. Priority defaults to 150. Display names cannot impersonate built-in roles. A completed creation identity never recreates a deleted role. Requires the `roles:write` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "createManagementRole",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRole"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementRoleOperation"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRole"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementRoleOperation"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "New custom role created with its original operation receipt."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Create a custom role",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/roles/{name}": {
      "delete": {
        "description": "Complete organization-bound snapshots carry opaque change tokens. Preserve reviewed tokens; never silently adopt later observations after a conflict. Requires expected_change_token. Existing member, directory, project, control-rule and live-invitation references refuse deletion. Built-ins cannot be deleted. An absent exact custom role returns 204. Requires the `roles:delete` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "deleteManagementRole",
        "parameters": [
          {
            "description": "Exact immutable role name. Built-ins are read-only; custom roles use custom_ followed by 32 lowercase hex digits.",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "pattern": "^(admin|developer|viewer|custom_[a-f0-9]{32})$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteManagementRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Delete a custom role conditionally",
        "tags": [
          "Management"
        ]
      },
      "get": {
        "description": "Complete organization-bound snapshots carry opaque change tokens. Preserve reviewed tokens; never silently adopt later observations after a conflict.  Requires the `roles:read` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "getManagementRole",
        "parameters": [
          {
            "description": "Exact immutable role name. Built-ins are read-only; custom roles use custom_ followed by 32 lowercase hex digits.",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "pattern": "^(admin|developer|viewer|custom_[a-f0-9]{32})$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRole"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Read a role snapshot",
        "tags": [
          "Management"
        ]
      },
      "put": {
        "description": "Complete organization-bound snapshots carry opaque change tokens. Preserve reviewed tokens; never silently adopt later observations after a conflict. Requires an actor-bound idempotency_key. The role mutation, audit and original result proof commit atomically. Identical completed replay returns the current snapshot with its original historical receipt when the resource remains present; it never reapplies the older intent. Changed intent under the same key conflicts. Recover the same receipt after an uncertain response. Requires the exact reviewed expected_change_token and a full definition including priority. Built-in roles are immutable. Requires the `roles:write` scope. Management keys only; delegated user OAuth and the existing members scopes grant no access. No query parameters are accepted.",
        "operationId": "updateManagementRole",
        "parameters": [
          {
            "description": "Exact immutable role name. Built-ins are read-only; custom roles use custom_ followed by 32 lowercase hex digits.",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "pattern": "^(admin|developer|viewer|custom_[a-f0-9]{32})$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateManagementRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementRole"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "operation": {
                          "$ref": "#/components/schemas/ManagementRoleOperation"
                        }
                      },
                      "required": [
                        "operation",
                        "idempotency_replayed"
                      ],
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Missing scope or role admission refused by current plan or authority."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Organization, role, member or this actor's receipt not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Reviewed state changed, operation intent conflicts, role is referenced, or assignment is protected. Inspect current state; do not automatically refresh tokens and retry."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain recoverable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Role state or transaction unavailable. Recover the same operation after an uncertain write result."
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Replace a custom role definition",
        "tags": [
          "Management"
        ]
      }
    },
    "/management/v1/usage": {
      "get": {
        "description": "Calls, tokens and cost for the calling organization over a window of at most 31 days, or for one of its projects with `project_uuid`, optionally grouped by API key, model, provider or project and split into hourly or daily UTC buckets. The figures are the ones the platform's usage pages show. `count`, the token sums and `cost` cover model calls; `evals_cost` and `guards_cost` are what evaluations and guard or routing checks cost, and `total_cost` is all three. Grouped by `api_key_id`, each row carries the key's id and, while the key exists, its name; calls made without a key have neither. Grouped by `project`, each row carries the project's UUID and name. Grouped totals are ranked by `total_cost`, most first. Web search surcharges are not included. Requires the `usage:read` scope.",
        "operationId": "getManagementUsage",
        "parameters": [
          {
            "description": "Inclusive RFC 3339 start. Defaults to seven days before `to`. At most 31 days before `to`.",
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Exclusive RFC 3339 end. Defaults to now.",
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "`none` (default), `api_key_id`, `model`, `provider` or `project`.",
            "in": "query",
            "name": "group_by",
            "schema": {
              "default": "none",
              "enum": [
                "none",
                "api_key_id",
                "model",
                "provider",
                "project"
              ],
              "type": "string"
            }
          },
          {
            "description": "`none` (default) for totals over the window, `hour` or `day` for a UTC series.",
            "in": "query",
            "name": "bucket",
            "schema": {
              "default": "none",
              "enum": [
                "none",
                "hour",
                "day"
              ],
              "type": "string"
            }
          },
          {
            "description": "Read one of the organization's projects instead of the whole organization.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "api_key_id": {
                            "type": "integer"
                          },
                          "api_key_name": {
                            "type": "string"
                          },
                          "bucket": {
                            "description": "Start of the UTC hour or day; absent when bucket=none.",
                            "format": "date-time",
                            "type": "string"
                          },
                          "cache_creation_tokens": {
                            "type": "integer"
                          },
                          "cache_read_tokens": {
                            "type": "integer"
                          },
                          "cache_savings": {
                            "type": "number"
                          },
                          "completion_tokens": {
                            "type": "integer"
                          },
                          "cost": {
                            "description": "USD, model calls.",
                            "type": "number"
                          },
                          "count": {
                            "description": "Model calls.",
                            "type": "integer"
                          },
                          "duration_ms_sum": {
                            "type": "integer"
                          },
                          "errors_other": {
                            "type": "integer"
                          },
                          "errors_policy": {
                            "type": "integer"
                          },
                          "errors_provider": {
                            "type": "integer"
                          },
                          "errors_rate_limited": {
                            "type": "integer"
                          },
                          "evals_cost": {
                            "description": "USD, evaluations.",
                            "type": "number"
                          },
                          "group": {
                            "description": "The group's key: the API key id, model, provider or project UUID. Absent for calls with no value for the grouping.",
                            "type": "string"
                          },
                          "guards_cost": {
                            "description": "USD, guard and routing checks.",
                            "type": "number"
                          },
                          "last_called_at": {
                            "description": "Grouped by project only.",
                            "format": "date-time",
                            "type": "string"
                          },
                          "project_name": {
                            "type": "string"
                          },
                          "project_uuid": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "prompt_tokens": {
                            "type": "integer"
                          },
                          "total_cost": {
                            "description": "USD, cost + evals_cost + guards_cost.",
                            "type": "number"
                          },
                          "total_tokens": {
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "bucket": {
                          "type": "string"
                        },
                        "currency": {
                          "example": "USD",
                          "type": "string"
                        },
                        "from": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "group_by": {
                          "type": "string"
                        },
                        "project_uuid": {
                          "description": "The project read, when `project_uuid` was given.",
                          "format": "uuid",
                          "type": "string"
                        },
                        "to": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "total_count": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "`project_uuid` names no project of the calling organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "ManagementBearer": []
          }
        ],
        "summary": "Get usage and cost",
        "tags": [
          "Management"
        ]
      }
    },
    "/mcp": {
      "post": {
        "description": "Public model discovery and scoped account operations over MCP 2026-07-28, with initialize-based Streamable HTTP compatibility for 2025-11-25 and 2025-06-18. Protected tool calls and legacy initialization challenge with OAuth protected-resource metadata. The MCP OAuth grant and issued inference keys have separate revocation lifecycles.",
        "operationId": "callUserMCP",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "id": {
                    "description": "Request identifier: a string or a number, never null. Echoed back on the response.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  "jsonrpc": {
                    "description": "JSON-RPC version. Always `2.0`.",
                    "enum": [
                      "2.0"
                    ],
                    "type": "string"
                  },
                  "method": {
                    "description": "The RPC to invoke. Must equal the `Mcp-Method` header.",
                    "enum": [
                      "server/discover",
                      "tools/list",
                      "tools/call"
                    ],
                    "type": "string"
                  },
                  "params": {
                    "description": "Method parameters. `_meta` is required on every request; `name` and `arguments` apply to `tools/call`.",
                    "properties": {
                      "_meta": {
                        "description": "Per-request protocol metadata. This replaced the `initialize` handshake, which is why it is required on every request.",
                        "properties": {
                          "io.modelcontextprotocol/clientCapabilities": {
                            "description": "Client capabilities relevant to this request. Send `{}` if none apply.",
                            "type": "object"
                          },
                          "io.modelcontextprotocol/clientInfo": {
                            "description": "Optional client name and version, for display and debugging only.",
                            "type": "object"
                          },
                          "io.modelcontextprotocol/protocolVersion": {
                            "description": "MCP revision this request uses. Must equal the `MCP-Protocol-Version` header.",
                            "example": "2026-07-28",
                            "type": "string"
                          }
                        },
                        "required": [
                          "io.modelcontextprotocol/protocolVersion",
                          "io.modelcontextprotocol/clientCapabilities"
                        ],
                        "type": "object"
                      },
                      "arguments": {
                        "description": "Arguments for the tool, matching its `inputSchema` from `tools/list`.",
                        "type": "object"
                      },
                      "name": {
                        "description": "Tool to invoke, for `tools/call`. Must equal the `Mcp-Name` header.",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON-RPC 2.0 response carrying either `result` or `error`, never both.",
                  "properties": {
                    "error": {
                      "description": "Present on failure, in place of `result`.",
                      "properties": {
                        "code": {
                          "description": "`-32020` header/body mismatch, `-32022` unsupported protocol version, `-32601` method not found, `-32602` invalid params.",
                          "type": "integer"
                        },
                        "data": {
                          "description": "Extra context. `-32022` carries the supported and requested versions here.",
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "id": {
                      "description": "The id of the request this answers."
                    },
                    "jsonrpc": {
                      "enum": [
                        "2.0"
                      ],
                      "type": "string"
                    },
                    "result": {
                      "description": "Present on success. Always carries `resultType: \"complete\"`; the remaining fields depend on the method — `tools` for `tools/list`, `content`/`structuredContent`/`isError` for `tools/call`, `supportedVersions`/`capabilities` for `server/discover`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "Operate Opper with delegated user authorization",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/api-keys": {
      "get": {
        "description": "List only your own personal inference keys with no project in the connected organization. Returns prefixes, never secrets. Existing project keys are listed with list_api_keys. Requires apikeys:read.",
        "operationId": "userListOrganizationPersonalKeys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementAPIKey"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "List your organization-scoped personal keys",
        "tags": [
          "User delegation"
        ]
      },
      "post": {
        "description": "Create a personal inference key with no project in the connected organization. Secrets are omitted by default; its ID supports call_model_with_org_key. Only kind=personal is allowed. Reuse idempotency_key and identical arguments on uncertain results; replay returns metadata without the secret. Requires apikeys:write.",
        "operationId": "userCreateOrganizationPersonalKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementAPIKey"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Idempotent replay: existing API key metadata without the secret."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateManagementAPIKeyResponse"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The idempotency key was used with different arguments or its API key was deleted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Create your organization-scoped personal key",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/api-keys/{id}": {
      "delete": {
        "description": "Revoke only your own personal inference key with no project in the connected organization. Disconnecting MCP OAuth is separate. Requires apikeys:write.",
        "operationId": "userDeleteOrganizationPersonalKey",
        "parameters": [
          {
            "description": "Your organization-scoped personal inference key ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Delete your organization-scoped personal key",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/api-keys/{id}/chat/completions": {
      "post": {
        "description": "Call a model using your own organization-scoped personal inference key. Omit project_uuid for organization policies. Optional explicit target must be a live project in the same organization. Secrets remain server-side; normal runtime checks apply.",
        "operationId": "userCallModelWithOrgKey",
        "parameters": [
          {
            "description": "Inference key ID in this project; its secret is never returned by this operation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Optional project target for your own organization-scoped personal key. Omit for organization policies.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Call a model with your personal key",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/api-keys/{id}/traces/{trace_id}": {
      "get": {
        "description": "Use this to read the trace of a call made with call_model_with_org_key and your own organization-scoped personal key. Omit project_uuid to read only traces without a project; pass it for that project. Current trace permissions apply. Requires runtime:read.",
        "operationId": "userGetTraceWithOrgKey",
        "parameters": [
          {
            "description": "Inference key ID in this project; its secret is never returned by this operation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "A trace UUID, or the span UUID returned in call_model meta.trace_uuid; either is resolved within the selected project.",
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional project target. Omit to read only traces without a project.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTraceResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read a trace with your personal key",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/context": {
      "get": {
        "description": "Current user, authorized organization, plan, scopes, billing snapshot and next steps. Pass project_uuid to assess that project's spend cap. Missing billing information is explicitly unknown. Requires account:read.",
        "operationId": "userGetContext",
        "parameters": [
          {
            "description": "Optional project UUID in the authorized organization.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "properties": {
                        "billing": {
                          "additionalProperties": true,
                          "allOf": [
                            {
                              "if": {
                                "properties": {
                                  "status": {
                                    "const": "available"
                                  }
                                },
                                "required": [
                                  "status"
                                ]
                              },
                              "then": {
                                "required": [
                                  "currency",
                                  "balance_cents",
                                  "blocked",
                                  "scope",
                                  "blocked_scope",
                                  "spend_status"
                                ]
                              }
                            },
                            {
                              "if": {
                                "properties": {
                                  "spend_status": {
                                    "const": "available"
                                  }
                                },
                                "required": [
                                  "spend_status"
                                ]
                              },
                              "then": {
                                "required": [
                                  "spent_cents"
                                ]
                              }
                            }
                          ],
                          "properties": {
                            "balance_cents": {
                              "description": "Organization funding balance in US cents; not model-specific runtime eligibility.",
                              "type": "integer"
                            },
                            "block_reason": {
                              "type": "string"
                            },
                            "blocked": {
                              "description": "Funding snapshot verdict within blocked_scope. A free-priced model still needs its own runtime-gate preflight.",
                              "type": "boolean"
                            },
                            "blocked_scope": {
                              "enum": [
                                "organization_only",
                                "organization_and_project"
                              ],
                              "type": "string"
                            },
                            "currency": {
                              "const": "USD",
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            },
                            "period_end": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "period_start": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "project_spent_cents": {
                              "description": "Selected project's spend in US cents, present only when project-scoped.",
                              "type": "integer"
                            },
                            "reason": {
                              "type": "string"
                            },
                            "scope": {
                              "const": "organization",
                              "type": "string"
                            },
                            "spend_status": {
                              "enum": [
                                "available",
                                "unknown"
                              ],
                              "type": "string"
                            },
                            "spent_cents": {
                              "description": "Organization spend in US cents for the returned billing period; not an invoice.",
                              "type": "integer"
                            },
                            "status": {
                              "description": "Unknown is not evidence of credits or permission to incur costs.",
                              "enum": [
                                "available",
                                "unknown"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "status"
                          ],
                          "type": "object"
                        },
                        "connection": {
                          "additionalProperties": true,
                          "properties": {
                            "client_id": {
                              "description": "Opaque OAuth client identifier, not a credential.",
                              "minLength": 1,
                              "type": "string"
                            },
                            "expires_at": {
                              "description": "Access token expiry as Unix seconds.",
                              "minimum": 0,
                              "type": "integer"
                            },
                            "grant_id": {
                              "description": "OAuth grant UUID; inference keys have a separate lifecycle.",
                              "format": "uuid",
                              "type": "string"
                            },
                            "scopes": {
                              "description": "Scopes actually authorized on this access token, not every scope the server supports.",
                              "items": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "client_id",
                            "grant_id",
                            "scopes",
                            "expires_at"
                          ],
                          "type": "object"
                        },
                        "links": {
                          "additionalProperties": true,
                          "properties": {
                            "billing": {
                              "description": "Open the authorized organization's billing page.",
                              "format": "uri",
                              "type": "string"
                            },
                            "connections": {
                              "description": "Review or disconnect agent connections in the browser.",
                              "format": "uri",
                              "type": "string"
                            },
                            "rules": {
                              "description": "Open the authorized organization's rules page.",
                              "format": "uri",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "next_actions": {
                          "description": "Suggested next steps; payment and consent remain browser actions.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "organization": {
                          "additionalProperties": true,
                          "properties": {
                            "id": {
                              "description": "Organization UUID authorized by this connection.",
                              "format": "uuid",
                              "type": "string"
                            },
                            "is_owner": {
                              "type": "boolean"
                            },
                            "name": {
                              "type": "string"
                            },
                            "plan": {
                              "description": "Current plan identifier; an empty value means it was unavailable.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "plan",
                            "is_owner"
                          ],
                          "type": "object"
                        },
                        "project": {
                          "additionalProperties": true,
                          "properties": {
                            "id": {
                              "description": "Selected project UUID, validated within the connected organization.",
                              "format": "uuid",
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "type": "object"
                        },
                        "user": {
                          "additionalProperties": true,
                          "properties": {
                            "id": {
                              "description": "Connected user's UUID.",
                              "format": "uuid",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "user",
                        "organization",
                        "connection",
                        "billing",
                        "links",
                        "next_actions"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  "required": [
                    "meta",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read the connected account context",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/controls/allowed-models": {
      "get": {
        "description": "Models passing inherited comply rules at the requested scope. This is a policy verdict, not a promise of plan eligibility, balance, or provider availability. Requires controls:read.",
        "operationId": "userGetAllowedModels",
        "parameters": [
          {
            "description": "Optional project UUID in the authorized organization. The project's rules are applied on top of the organization's. Omit it for the organization alone.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read effective model allowlist",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/controls/rules": {
      "get": {
        "description": "Lists rules in the calling organization. Project filters include inherited organization rules and matching function rules. Allowlist rules include effective_count and parent_allowlist; guard rules may include allowed_model_ids. Requires the `controls:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userListManagementControlRules",
        "parameters": [
          {
            "description": "Only rules that apply in this project",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Only rules of this kind",
            "in": "query",
            "name": "kind",
            "schema": {
              "enum": [
                "guard",
                "observe",
                "route",
                "comply"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementControlRule"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "List control rules",
        "tags": [
          "User delegation"
        ]
      },
      "post": {
        "description": "Creates a rule with a client-generated UUID. Setting enabled applies it immediately. Read rules again to inspect effective policy. Requires the `controls:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userCreateManagementControlRule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "config": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "description": "Spending cap that resets per period (day, week or month) or holds in total. At most one enabled budget per target; a project, role or member cap cannot exceed an organization cap of the same period. The server enforces cross-rule constraints when saving.",
                        "properties": {
                          "alerts_enabled": {
                            "description": "Alert preference stored with the budget rule.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "counted_from": {
                            "description": "Where a total cap counts spend from; omitted means the rule's creation. Set it to now to reset a total cap.",
                            "format": "date-time",
                            "type": "string"
                          },
                          "monthly_limit_cents": {
                            "description": "Cap per period in integer USD cents: 100 cents = $1; 1000 = $10; 10000 = $100. Zero is a zero-dollar cap, not unlimited. Named for the monthly period it once always was; it is the cap for whichever period is set.",
                            "minimum": 0,
                            "type": "integer",
                            "x-currency": "USD",
                            "x-unit": "cents"
                          },
                          "period": {
                            "description": "When the cap resets: day (00:00 UTC), week (Monday 00:00 UTC), month (with the billing period), or total (never; counts from counted_from). Omitted means month.",
                            "enum": [
                              "day",
                              "week",
                              "month",
                              "total"
                            ],
                            "type": "string"
                          },
                          "soft_limit_pct": {
                            "description": "Warning threshold as a percentage of the cap; 80 means 80%. Zero or omission means unset.",
                            "maximum": 100,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": {
                            "const": "budget",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "monthly_limit_cents"
                        ],
                        "title": "comply.budget",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Constrain models, provider companies/routes, locations, makers, and upstream data handling. Omitted/empty categories impose no restriction; configured categories combine with AND. Child scopes may only narrow parents; exclusions accumulate and win. Use schema_version=4: models and exclude_models list model keys, endpoints and exclude_endpoints list endpoint ids, and an endpoint is pinned when its model is in models or its id is in endpoints. schema_version=5 adds \"*\" wildcards in exclude_models and exclude_endpoints (exclude_models [\"*deepseek*\"] blocks every DeepSeek model) and except_models / except_endpoints, exceptions that lift the same rule's exclusions only; write 5 only when the rule uses either. Inspect get_allowed_models/inherited policy before applying. Model/provider examples illustrate syntax; use the current catalog to select values.",
                        "properties": {
                          "allowlist": {
                            "additionalProperties": false,
                            "properties": {
                              "custom_models": {
                                "description": "Own custom models (list_custom_models ids) this rule lets through unchecked. Add {id}; on update send back each stored id and fingerprint.",
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fingerprint": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "type": "object"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "endpoints": {
                                "items": {
                                  "description": "Endpoint ids to allow: the id field of a list_models entry, such as gemini/gemma-4-31b. Pins one endpoint and no other of its model. With models it is one pin list: an endpoint is allowed when its model is in models or its id is here, and the other categories allow it.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_endpoints": {
                                "items": {
                                  "description": "Schema_version 5. Endpoint ids or \"*\" patterns this rule's exclusions do not deny, as except_models but per endpoint.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_models": {
                                "items": {
                                  "description": "Schema_version 5. Model keys or \"*\" patterns this rule's exclude_models and exclude_endpoints do not deny: exclude_models [\"*deepseek*\"] with except_models [\"deepseek-v4\"] blocks every DeepSeek model but that one. Lifts nothing another rule excludes and pins nothing. Each entry must except something the rule excludes.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_endpoints": {
                                "items": {
                                  "description": "Endpoint ids to deny: the id field of a list_models entry, such as gemini/gemma-4-31b. From schema_version 5 an entry may hold \"*\" wildcards. Exclusions accumulate down scopes and override allowlists.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_models": {
                                "items": {
                                  "description": "Model keys to deny on every provider: the model field of a list_models entry. From schema_version 5 an entry may hold \"*\" for any characters (\"*deepseek*\"); a wildcard must match a catalog model when saved. Exclusions accumulate down scopes and override allowlists. Do not include and exclude the same model.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "handling": {
                                "additionalProperties": false,
                                "properties": {
                                  "cache_scopes": {
                                    "items": {
                                      "enum": [
                                        "api_key",
                                        "organization",
                                        "shared"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "caching": {
                                    "items": {
                                      "enum": [
                                        "explicit",
                                        "implicit",
                                        "none"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "human_review": {
                                    "items": {
                                      "enum": [
                                        "human_can_view",
                                        "none",
                                        "signals_only"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "logging": {
                                    "items": {
                                      "enum": [
                                        "abuse_monitoring",
                                        "limited_debug",
                                        "none",
                                        "other"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "max_retention_days": {
                                    "description": "Maximum upstream provider content-retention days, separate from Opper storage retention. Zero requires no upstream retention; null/omission imposes no cap.",
                                    "minimum": 0,
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "x-unit": "days"
                                  },
                                  "moderation": {
                                    "items": {
                                      "enum": [
                                        "default_on",
                                        "mandatory",
                                        "none",
                                        "optional"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "subprocessors_read_content": {
                                    "description": "False requires that subprocessors do not read content; null/omission does not consult the category.",
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  },
                                  "training": {
                                    "items": {
                                      "enum": [
                                        "no",
                                        "yes"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "maker": {
                                "additionalProperties": false,
                                "properties": {
                                  "jurisdiction": {
                                    "items": {
                                      "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                      "enum": [
                                        "AE",
                                        "AR",
                                        "AT",
                                        "AU",
                                        "BE",
                                        "BG",
                                        "BH",
                                        "BR",
                                        "CA",
                                        "CH",
                                        "CL",
                                        "CN",
                                        "CY",
                                        "CZ",
                                        "DE",
                                        "DK",
                                        "EE",
                                        "EEA",
                                        "EG",
                                        "ES",
                                        "EU",
                                        "FI",
                                        "FR",
                                        "GB",
                                        "GLOBAL",
                                        "GR",
                                        "HK",
                                        "HR",
                                        "HU",
                                        "ID",
                                        "IE",
                                        "IL",
                                        "IN",
                                        "IS",
                                        "IT",
                                        "JP",
                                        "KE",
                                        "KR",
                                        "KW",
                                        "LI",
                                        "LT",
                                        "LU",
                                        "LV",
                                        "MT",
                                        "MX",
                                        "MY",
                                        "NG",
                                        "NL",
                                        "NO",
                                        "NZ",
                                        "PH",
                                        "PL",
                                        "PT",
                                        "QA",
                                        "RO",
                                        "RS",
                                        "SA",
                                        "SE",
                                        "SG",
                                        "SI",
                                        "SK",
                                        "TH",
                                        "TR",
                                        "TW",
                                        "UA",
                                        "US",
                                        "VN",
                                        "ZA"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "name": {
                                    "items": {
                                      "description": "Slug of the company that trained the weights.",
                                      "minLength": 1,
                                      "pattern": "^\\S(?:.*\\S)?$",
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "models": {
                                "items": {
                                  "description": "Model keys to allow: the model field of a list_models entry, such as gemma-4-31b. A key admits every endpoint of that model the other categories allow. Verify the resulting callable ids with get_allowed_models.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "provider": {
                                "additionalProperties": false,
                                "properties": {
                                  "locations": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "inference": {
                                        "additionalProperties": false,
                                        "description": "Where inference runs. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "jurisdiction": {
                                        "additionalProperties": false,
                                        "description": "The provider's ultimate parent's legal home, separate from inference/storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "storage": {
                                        "additionalProperties": false,
                                        "description": "Where upstream retained content is stored. A route retaining no content satisfies storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "name": {
                                    "additionalProperties": false,
                                    "description": "Provider company public slugs, not adapter keys. Do not include and exclude the same company.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "route": {
                                    "additionalProperties": false,
                                    "description": "Individual catalog service-route IDs. Do not include and exclude the same route.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "type": {
                            "const": "allowlist",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "allowlist"
                        ],
                        "title": "comply.allowlist",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Opper storage retention, separate from upstream provider retention in allowlist.handling.max_retention_days. The strictest enabled org/project retention wins. Files the customer stores explicitly (uploads, store: true) are outside retention and are never deleted by it.",
                        "properties": {
                          "retention_days": {
                            "description": "0–30 days. Zero enables zero-day storage retention. Null/omission contributes no retention cap.",
                            "maximum": 30,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "days"
                          },
                          "type": {
                            "const": "retention",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "comply.retention",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Response caching is switched by the outer rule's enabled flag.",
                        "properties": {
                          "ttl_seconds": {
                            "default": 3600,
                            "description": "Cache lifetime in seconds. Null/omission uses the server default; zero is invalid.",
                            "maximum": 3600,
                            "minimum": 60,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "seconds"
                          },
                          "type": {
                            "const": "cache",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "route.cache",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Order a bare model's provider pool. Custom CEL keys are compiled on save and sort ascending over model.cost, model.ttft and model.throughput. Presets need no expression.",
                        "else": {
                          "not": {
                            "required": [
                              "expression"
                            ]
                          }
                        },
                        "if": {
                          "properties": {
                            "order": {
                              "const": "custom",
                              "type": "string"
                            }
                          },
                          "required": [
                            "order"
                          ]
                        },
                        "properties": {
                          "expression": {
                            "description": "CEL sort key; only valid when order=custom.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "order": {
                            "enum": [
                              "cost",
                              "latency",
                              "throughput",
                              "weighted",
                              "custom"
                            ],
                            "type": "string"
                          },
                          "type": {
                            "const": "pool_order",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "order"
                        ],
                        "then": {
                          "required": [
                            "expression"
                          ]
                        },
                        "title": "route.pool_order",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Match with Go regular expressions, compiled on save. Exceptions let a match through when the matched text contains a match of one of them (Go regex has no lookaround). Use the outer rule scope, not embedded scope or identity. An empty patterns list is an inert draft.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "regex",
                            "type": "string"
                          },
                          "exceptions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save. A pattern match that contains a match of it is let through: not flagged, blocked or redacted.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "patterns": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "patterns"
                        ],
                        "title": "guard.regex",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate a natural-language guard prompt. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "llm",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "prompt": {
                            "description": "Natural-language check performed by the guard.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "prompt"
                        ],
                        "title": "guard.llm",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Score the text against categories with a decision model (catalog type evaluation): one true-or-false question per category, fired when a category's probability reaches its threshold. Fast and cheap; flags or blocks but cannot redact. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "categories": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "description": "Custom category name, reported in findings.",
                                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                                  "type": "string"
                                },
                                "preset": {
                                  "description": "A category Opper maintains. Takes no name or statement.",
                                  "enum": [
                                    "jailbreak",
                                    "pii",
                                    "prompt_injection",
                                    "toxicity"
                                  ],
                                  "type": "string"
                                },
                                "statement": {
                                  "description": "Custom category: a sentence that is true when the text should be caught.",
                                  "maxLength": 1000,
                                  "type": "string"
                                },
                                "threshold": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 1,
                                  "type": "number"
                                }
                              },
                              "type": "object"
                            },
                            "maxItems": 16,
                            "minItems": 1,
                            "type": "array"
                          },
                          "engine": {
                            "const": "decision",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "model": {
                            "description": "Decision model (catalog type evaluation). Omit for the server's default ladder.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "on_error": {
                            "default": "allow",
                            "description": "What the guard does when no model answers.",
                            "enum": [
                              "allow",
                              "block"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "description": "Default threshold for categories without their own; omit to use each preset's.",
                            "exclusiveMinimum": 0,
                            "maximum": 1,
                            "type": "number"
                          }
                        },
                        "required": [
                          "engine",
                          "categories"
                        ],
                        "title": "guard.decision",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate sampled generations with the server's Controls judge. Sampling rate is one in N, not a percentage. Each matching rule produces an independent evaluation. Use the outer rule's enabled flag and scope.",
                        "if": {
                          "properties": {
                            "score_type": {
                              "const": "binary",
                              "type": "string"
                            }
                          },
                          "required": [
                            "score_type"
                          ]
                        },
                        "properties": {
                          "criteria": {
                            "description": "Evaluation rubric. Required for binary scoring; omit for the default score rubric.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "evaluators": {
                            "description": "Uses the server's Controls judge; client model tiers are not configurable.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "type": {
                                  "const": "judge",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "type": "object"
                            },
                            "maxItems": 1,
                            "minItems": 1,
                            "type": "array"
                          },
                          "sampling": {
                            "oneOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "strategy": {
                                    "const": "all",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "rate": {
                                    "default": 10,
                                    "description": "Evaluate 1 in N generations. rate=10 is about 10%; rate=100 is about 1%.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "rate",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "base_rate": {
                                    "default": 100,
                                    "description": "Evaluations per window before adaptive throttling.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "adaptive",
                                    "type": "string"
                                  },
                                  "window": {
                                    "default": "1h",
                                    "enum": [
                                      "1h",
                                      "24h"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "score_type": {
                            "default": "score",
                            "enum": [
                              "score",
                              "binary"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "default": 0.5,
                            "description": "Scores below this value are flagged. Omission or zero uses 0.5. Binary scoring flags a zero verdict.",
                            "maximum": 1,
                            "minimum": 0,
                            "type": "number"
                          }
                        },
                        "required": [
                          "evaluators"
                        ],
                        "then": {
                          "required": [
                            "criteria"
                          ]
                        },
                        "title": "observe",
                        "type": "object"
                      }
                    ],
                    "description": "Config for the rule kind. Replaces the full config on update. Read existing rules and get_rule_vocabulary before changing it; organization constraints remain in force. For an allowlist, its description says which schema_version to write. Opper retention_days and upstream handling.max_retention_days are separate controls."
                  },
                  "confirm_file_deletion": {
                    "description": "Deprecated and ignored: no rule deletes stored files.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "description": "Whether the rule is enforced. Omitted on create means false.",
                    "type": "boolean"
                  },
                  "id": {
                    "description": "Client-generated UUID for this new rule.",
                    "format": "uuid",
                    "type": "string"
                  },
                  "idempotency_key": {
                    "description": "Optional operation identifier. Reuse it with the same rule id and create payload when retrying an uncertain response. A changed payload or a deleted original rule returns 409; successful replay returns the existing rule without recreating it.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[A-Za-z0-9._:-]{1,128}$",
                    "type": "string"
                  },
                  "kind": {
                    "enum": [
                      "guard",
                      "observe",
                      "route",
                      "comply"
                    ],
                    "type": "string"
                  },
                  "name": {
                    "description": "Display name; null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "schema_version": {
                    "description": "Config schema version. Omit on create for version 1. Version 2 comply allowlists identify providers by company slug. Use 4 for model lists (models and exclude_models name model keys, endpoints and exclude_endpoints name endpoint ids), and 5 only when exclude_models or exclude_endpoints hold \"*\" wildcards or the rule has except_models or except_endpoints.",
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "scope": {
                    "additionalProperties": false,
                    "description": "Use org for organization-wide scope; projects requires project_uuids. IDs must belong to the caller's organization. roles (role_names) and members (member_uuids) are only for comply budget rules: a monthly cap on each member's personal-key spend, where a member's own cap wins over their role's.",
                    "properties": {
                      "member_uuids": {
                        "description": "User UUIDs of organization members for a members scope.",
                        "items": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "project_uuids": {
                        "items": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "role_names": {
                        "description": "Role names (built-in or the organization's custom roles) for a roles scope.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "type": {
                        "enum": [
                          "org",
                          "projects",
                          "roles",
                          "members"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "scope",
                  "config"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementControlRule"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Idempotent replay: current state of the previously created rule."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementControlRule"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "plan_required"
                          ],
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "payment_required"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The rule's kind is a Control Plane feature (`observe`, `route`, `guard`, `comply`) and the organization's plan does not include it. The message names the kind and the current plan. Reading and deleting rules is not plan gated."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    },
                    "file_count": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Conflicting rule, changed idempotency payload, deleted original rule, policy invariant, or explicit file-deletion acknowledgement required."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Create a control rule",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/controls/rules/{uuid}": {
      "delete": {
        "description": "Deletes a rule and stops its enforcement; inherited rules still apply. Requires the `controls:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userDeleteManagementControlRule",
        "parameters": [
          {
            "description": "Rule id",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Delete a control rule",
        "tags": [
          "User delegation"
        ]
      },
      "patch": {
        "description": "Updates name, enabled, config or schema_version; omit fields to keep them and use name:null to clear a name. Config is replaced, not merged. ID, kind and scope are immutable. An empty update is rejected. Requires the `controls:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userUpdateManagementControlRule",
        "parameters": [
          {
            "description": "Rule id",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "config": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "description": "Spending cap that resets per period (day, week or month) or holds in total. At most one enabled budget per target; a project, role or member cap cannot exceed an organization cap of the same period. The server enforces cross-rule constraints when saving.",
                        "properties": {
                          "alerts_enabled": {
                            "description": "Alert preference stored with the budget rule.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "counted_from": {
                            "description": "Where a total cap counts spend from; omitted means the rule's creation. Set it to now to reset a total cap.",
                            "format": "date-time",
                            "type": "string"
                          },
                          "monthly_limit_cents": {
                            "description": "Cap per period in integer USD cents: 100 cents = $1; 1000 = $10; 10000 = $100. Zero is a zero-dollar cap, not unlimited. Named for the monthly period it once always was; it is the cap for whichever period is set.",
                            "minimum": 0,
                            "type": "integer",
                            "x-currency": "USD",
                            "x-unit": "cents"
                          },
                          "period": {
                            "description": "When the cap resets: day (00:00 UTC), week (Monday 00:00 UTC), month (with the billing period), or total (never; counts from counted_from). Omitted means month.",
                            "enum": [
                              "day",
                              "week",
                              "month",
                              "total"
                            ],
                            "type": "string"
                          },
                          "soft_limit_pct": {
                            "description": "Warning threshold as a percentage of the cap; 80 means 80%. Zero or omission means unset.",
                            "maximum": 100,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": {
                            "const": "budget",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "monthly_limit_cents"
                        ],
                        "title": "comply.budget",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Constrain models, provider companies/routes, locations, makers, and upstream data handling. Omitted/empty categories impose no restriction; configured categories combine with AND. Child scopes may only narrow parents; exclusions accumulate and win. Use schema_version=4: models and exclude_models list model keys, endpoints and exclude_endpoints list endpoint ids, and an endpoint is pinned when its model is in models or its id is in endpoints. schema_version=5 adds \"*\" wildcards in exclude_models and exclude_endpoints (exclude_models [\"*deepseek*\"] blocks every DeepSeek model) and except_models / except_endpoints, exceptions that lift the same rule's exclusions only; write 5 only when the rule uses either. Inspect get_allowed_models/inherited policy before applying. Model/provider examples illustrate syntax; use the current catalog to select values.",
                        "properties": {
                          "allowlist": {
                            "additionalProperties": false,
                            "properties": {
                              "custom_models": {
                                "description": "Own custom models (list_custom_models ids) this rule lets through unchecked. Add {id}; on update send back each stored id and fingerprint.",
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fingerprint": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "type": "object"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "endpoints": {
                                "items": {
                                  "description": "Endpoint ids to allow: the id field of a list_models entry, such as gemini/gemma-4-31b. Pins one endpoint and no other of its model. With models it is one pin list: an endpoint is allowed when its model is in models or its id is here, and the other categories allow it.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_endpoints": {
                                "items": {
                                  "description": "Schema_version 5. Endpoint ids or \"*\" patterns this rule's exclusions do not deny, as except_models but per endpoint.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "except_models": {
                                "items": {
                                  "description": "Schema_version 5. Model keys or \"*\" patterns this rule's exclude_models and exclude_endpoints do not deny: exclude_models [\"*deepseek*\"] with except_models [\"deepseek-v4\"] blocks every DeepSeek model but that one. Lifts nothing another rule excludes and pins nothing. Each entry must except something the rule excludes.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_endpoints": {
                                "items": {
                                  "description": "Endpoint ids to deny: the id field of a list_models entry, such as gemini/gemma-4-31b. From schema_version 5 an entry may hold \"*\" wildcards. Exclusions accumulate down scopes and override allowlists.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "exclude_models": {
                                "items": {
                                  "description": "Model keys to deny on every provider: the model field of a list_models entry. From schema_version 5 an entry may hold \"*\" for any characters (\"*deepseek*\"); a wildcard must match a catalog model when saved. Exclusions accumulate down scopes and override allowlists. Do not include and exclude the same model.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "handling": {
                                "additionalProperties": false,
                                "properties": {
                                  "cache_scopes": {
                                    "items": {
                                      "enum": [
                                        "api_key",
                                        "organization",
                                        "shared"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "caching": {
                                    "items": {
                                      "enum": [
                                        "explicit",
                                        "implicit",
                                        "none"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "human_review": {
                                    "items": {
                                      "enum": [
                                        "human_can_view",
                                        "none",
                                        "signals_only"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "logging": {
                                    "items": {
                                      "enum": [
                                        "abuse_monitoring",
                                        "limited_debug",
                                        "none",
                                        "other"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "max_retention_days": {
                                    "description": "Maximum upstream provider content-retention days, separate from Opper storage retention. Zero requires no upstream retention; null/omission imposes no cap.",
                                    "minimum": 0,
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "x-unit": "days"
                                  },
                                  "moderation": {
                                    "items": {
                                      "enum": [
                                        "default_on",
                                        "mandatory",
                                        "none",
                                        "optional"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "subprocessors_read_content": {
                                    "description": "False requires that subprocessors do not read content; null/omission does not consult the category.",
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  },
                                  "training": {
                                    "items": {
                                      "enum": [
                                        "no",
                                        "yes"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "maker": {
                                "additionalProperties": false,
                                "properties": {
                                  "jurisdiction": {
                                    "items": {
                                      "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                      "enum": [
                                        "AE",
                                        "AR",
                                        "AT",
                                        "AU",
                                        "BE",
                                        "BG",
                                        "BH",
                                        "BR",
                                        "CA",
                                        "CH",
                                        "CL",
                                        "CN",
                                        "CY",
                                        "CZ",
                                        "DE",
                                        "DK",
                                        "EE",
                                        "EEA",
                                        "EG",
                                        "ES",
                                        "EU",
                                        "FI",
                                        "FR",
                                        "GB",
                                        "GLOBAL",
                                        "GR",
                                        "HK",
                                        "HR",
                                        "HU",
                                        "ID",
                                        "IE",
                                        "IL",
                                        "IN",
                                        "IS",
                                        "IT",
                                        "JP",
                                        "KE",
                                        "KR",
                                        "KW",
                                        "LI",
                                        "LT",
                                        "LU",
                                        "LV",
                                        "MT",
                                        "MX",
                                        "MY",
                                        "NG",
                                        "NL",
                                        "NO",
                                        "NZ",
                                        "PH",
                                        "PL",
                                        "PT",
                                        "QA",
                                        "RO",
                                        "RS",
                                        "SA",
                                        "SE",
                                        "SG",
                                        "SI",
                                        "SK",
                                        "TH",
                                        "TR",
                                        "TW",
                                        "UA",
                                        "US",
                                        "VN",
                                        "ZA"
                                      ],
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  },
                                  "name": {
                                    "items": {
                                      "description": "Slug of the company that trained the weights.",
                                      "minLength": 1,
                                      "pattern": "^\\S(?:.*\\S)?$",
                                      "type": "string"
                                    },
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "type": "object"
                              },
                              "models": {
                                "items": {
                                  "description": "Model keys to allow: the model field of a list_models entry, such as gemma-4-31b. A key admits every endpoint of that model the other categories allow. Verify the resulting callable ids with get_allowed_models.",
                                  "minLength": 1,
                                  "pattern": "^\\S(?:.*\\S)?$",
                                  "type": "string"
                                },
                                "type": "array",
                                "uniqueItems": true
                              },
                              "provider": {
                                "additionalProperties": false,
                                "properties": {
                                  "locations": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "inference": {
                                        "additionalProperties": false,
                                        "description": "Where inference runs. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "jurisdiction": {
                                        "additionalProperties": false,
                                        "description": "The provider's ultimate parent's legal home, separate from inference/storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "storage": {
                                        "additionalProperties": false,
                                        "description": "Where upstream retained content is stored. A route retaining no content satisfies storage residency. Codes match by containment: EU includes SE. Exclude cannot contain GLOBAL. Do not list an area and its member in the same direction.",
                                        "properties": {
                                          "exclude": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "not": {
                                                "const": "GLOBAL"
                                              },
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          },
                                          "include": {
                                            "items": {
                                              "description": "Uppercase ISO 3166-1 alpha-2 country code or EU/EEA/GLOBAL area. See locations for labels and containment.",
                                              "enum": [
                                                "AE",
                                                "AR",
                                                "AT",
                                                "AU",
                                                "BE",
                                                "BG",
                                                "BH",
                                                "BR",
                                                "CA",
                                                "CH",
                                                "CL",
                                                "CN",
                                                "CY",
                                                "CZ",
                                                "DE",
                                                "DK",
                                                "EE",
                                                "EEA",
                                                "EG",
                                                "ES",
                                                "EU",
                                                "FI",
                                                "FR",
                                                "GB",
                                                "GLOBAL",
                                                "GR",
                                                "HK",
                                                "HR",
                                                "HU",
                                                "ID",
                                                "IE",
                                                "IL",
                                                "IN",
                                                "IS",
                                                "IT",
                                                "JP",
                                                "KE",
                                                "KR",
                                                "KW",
                                                "LI",
                                                "LT",
                                                "LU",
                                                "LV",
                                                "MT",
                                                "MX",
                                                "MY",
                                                "NG",
                                                "NL",
                                                "NO",
                                                "NZ",
                                                "PH",
                                                "PL",
                                                "PT",
                                                "QA",
                                                "RO",
                                                "RS",
                                                "SA",
                                                "SE",
                                                "SG",
                                                "SI",
                                                "SK",
                                                "TH",
                                                "TR",
                                                "TW",
                                                "UA",
                                                "US",
                                                "VN",
                                                "ZA"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array",
                                            "uniqueItems": true
                                          }
                                        },
                                        "type": "object"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "name": {
                                    "additionalProperties": false,
                                    "description": "Provider company public slugs, not adapter keys. Do not include and exclude the same company.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Provider company slug.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "route": {
                                    "additionalProperties": false,
                                    "description": "Individual catalog service-route IDs. Do not include and exclude the same route.",
                                    "properties": {
                                      "exclude": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      },
                                      "include": {
                                        "items": {
                                          "description": "Catalog service-route ID.",
                                          "minLength": 1,
                                          "pattern": "^\\S(?:.*\\S)?$",
                                          "type": "string"
                                        },
                                        "type": "array",
                                        "uniqueItems": true
                                      }
                                    },
                                    "type": "object"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "type": {
                            "const": "allowlist",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "allowlist"
                        ],
                        "title": "comply.allowlist",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Opper storage retention, separate from upstream provider retention in allowlist.handling.max_retention_days. The strictest enabled org/project retention wins. Files the customer stores explicitly (uploads, store: true) are outside retention and are never deleted by it.",
                        "properties": {
                          "retention_days": {
                            "description": "0–30 days. Zero enables zero-day storage retention. Null/omission contributes no retention cap.",
                            "maximum": 30,
                            "minimum": 0,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "days"
                          },
                          "type": {
                            "const": "retention",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "comply.retention",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Response caching is switched by the outer rule's enabled flag.",
                        "properties": {
                          "ttl_seconds": {
                            "default": 3600,
                            "description": "Cache lifetime in seconds. Null/omission uses the server default; zero is invalid.",
                            "maximum": 3600,
                            "minimum": 60,
                            "type": [
                              "integer",
                              "null"
                            ],
                            "x-unit": "seconds"
                          },
                          "type": {
                            "const": "cache",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "title": "route.cache",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Order a bare model's provider pool. Custom CEL keys are compiled on save and sort ascending over model.cost, model.ttft and model.throughput. Presets need no expression.",
                        "else": {
                          "not": {
                            "required": [
                              "expression"
                            ]
                          }
                        },
                        "if": {
                          "properties": {
                            "order": {
                              "const": "custom",
                              "type": "string"
                            }
                          },
                          "required": [
                            "order"
                          ]
                        },
                        "properties": {
                          "expression": {
                            "description": "CEL sort key; only valid when order=custom.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "order": {
                            "enum": [
                              "cost",
                              "latency",
                              "throughput",
                              "weighted",
                              "custom"
                            ],
                            "type": "string"
                          },
                          "type": {
                            "const": "pool_order",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "order"
                        ],
                        "then": {
                          "required": [
                            "expression"
                          ]
                        },
                        "title": "route.pool_order",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Match with Go regular expressions, compiled on save. Exceptions let a match through when the matched text contains a match of one of them (Go regex has no lookaround). Use the outer rule scope, not embedded scope or identity. An empty patterns list is an inert draft.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "regex",
                            "type": "string"
                          },
                          "exceptions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save. A pattern match that contains a match of it is let through: not flagged, blocked or redacted.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "patterns": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "regex": {
                                  "description": "Go regular expression, compiled on save.",
                                  "minLength": 1,
                                  "pattern": "\\S",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "regex"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "uniqueItems": true
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "patterns"
                        ],
                        "title": "guard.regex",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate a natural-language guard prompt. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block",
                              "redact"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "engine": {
                            "const": "llm",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "prompt": {
                            "description": "Natural-language check performed by the guard.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "replacement": {
                            "description": "Replacement text when action=redact.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "engine",
                          "prompt"
                        ],
                        "title": "guard.llm",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Score the text against categories with a decision model (catalog type evaluation): one true-or-false question per category, fired when a category's probability reaches its threshold. Fast and cheap; flags or blocks but cannot redact. Use the outer rule scope, not embedded scope or identity.",
                        "properties": {
                          "action": {
                            "default": "flag",
                            "enum": [
                              "flag",
                              "block"
                            ],
                            "type": "string"
                          },
                          "applies_to": {
                            "default": "input",
                            "enum": [
                              "input",
                              "output",
                              "both"
                            ],
                            "type": "string"
                          },
                          "categories": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "description": "Custom category name, reported in findings.",
                                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                                  "type": "string"
                                },
                                "preset": {
                                  "description": "A category Opper maintains. Takes no name or statement.",
                                  "enum": [
                                    "jailbreak",
                                    "pii",
                                    "prompt_injection",
                                    "toxicity"
                                  ],
                                  "type": "string"
                                },
                                "statement": {
                                  "description": "Custom category: a sentence that is true when the text should be caught.",
                                  "maxLength": 1000,
                                  "type": "string"
                                },
                                "threshold": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 1,
                                  "type": "number"
                                }
                              },
                              "type": "object"
                            },
                            "maxItems": 16,
                            "minItems": 1,
                            "type": "array"
                          },
                          "engine": {
                            "const": "decision",
                            "type": "string"
                          },
                          "handle": {
                            "description": "What a call names the guard by in X-Opper-Guards. Unique per organization. Omit to derive one from the rule name on first save; kept when the rule is renamed or its config is replaced without it.",
                            "maxLength": 63,
                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                            "type": "string"
                          },
                          "invoke": {
                            "default": "always",
                            "description": "always: runs on every call in the rule's scope. on_request: runs only on calls that name the rule (its handle or id) in the X-Opper-Guards header.",
                            "enum": [
                              "always",
                              "on_request"
                            ],
                            "type": "string"
                          },
                          "kind": {
                            "const": "guard",
                            "type": "string"
                          },
                          "model": {
                            "description": "Decision model (catalog type evaluation). Omit for the server's default ladder.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "on_error": {
                            "default": "allow",
                            "description": "What the guard does when no model answers.",
                            "enum": [
                              "allow",
                              "block"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "description": "Default threshold for categories without their own; omit to use each preset's.",
                            "exclusiveMinimum": 0,
                            "maximum": 1,
                            "type": "number"
                          }
                        },
                        "required": [
                          "engine",
                          "categories"
                        ],
                        "title": "guard.decision",
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "description": "Evaluate sampled generations with the server's Controls judge. Sampling rate is one in N, not a percentage. Each matching rule produces an independent evaluation. Use the outer rule's enabled flag and scope.",
                        "if": {
                          "properties": {
                            "score_type": {
                              "const": "binary",
                              "type": "string"
                            }
                          },
                          "required": [
                            "score_type"
                          ]
                        },
                        "properties": {
                          "criteria": {
                            "description": "Evaluation rubric. Required for binary scoring; omit for the default score rubric.",
                            "minLength": 1,
                            "pattern": "\\S",
                            "type": "string"
                          },
                          "evaluators": {
                            "description": "Uses the server's Controls judge; client model tiers are not configurable.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "type": {
                                  "const": "judge",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "type": "object"
                            },
                            "maxItems": 1,
                            "minItems": 1,
                            "type": "array"
                          },
                          "sampling": {
                            "oneOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "strategy": {
                                    "const": "all",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "rate": {
                                    "default": 10,
                                    "description": "Evaluate 1 in N generations. rate=10 is about 10%; rate=100 is about 1%.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "rate",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "base_rate": {
                                    "default": 100,
                                    "description": "Evaluations per window before adaptive throttling.",
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "strategy": {
                                    "const": "adaptive",
                                    "type": "string"
                                  },
                                  "window": {
                                    "default": "1h",
                                    "enum": [
                                      "1h",
                                      "24h"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "strategy"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "score_type": {
                            "default": "score",
                            "enum": [
                              "score",
                              "binary"
                            ],
                            "type": "string"
                          },
                          "threshold": {
                            "default": 0.5,
                            "description": "Scores below this value are flagged. Omission or zero uses 0.5. Binary scoring flags a zero verdict.",
                            "maximum": 1,
                            "minimum": 0,
                            "type": "number"
                          }
                        },
                        "required": [
                          "evaluators"
                        ],
                        "then": {
                          "required": [
                            "criteria"
                          ]
                        },
                        "title": "observe",
                        "type": "object"
                      }
                    ],
                    "description": "Config for the rule kind. Replaces the full config on update. Read existing rules and get_rule_vocabulary before changing it; organization constraints remain in force. For an allowlist, its description says which schema_version to write. Opper retention_days and upstream handling.max_retention_days are separate controls."
                  },
                  "confirm_file_deletion": {
                    "description": "Deprecated and ignored: no rule deletes stored files.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "description": "Whether the rule is enforced. Omitted on create means false.",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Display name; null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "schema_version": {
                    "description": "Config schema version. Omit on create for version 1. Version 2 comply allowlists identify providers by company slug. Use 4 for model lists (models and exclude_models name model keys, endpoints and exclude_endpoints name endpoint ids), and 5 only when exclude_models or exclude_endpoints hold \"*\" wildcards or the rule has except_models or except_endpoints.",
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementControlRule"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "plan_required"
                          ],
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "payment_required"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The rule's kind is a Control Plane feature (`observe`, `route`, `guard`, `comply`) and the organization's plan does not include it. The message names the kind and the current plan. Reading and deleting rules is not plan gated."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    },
                    "file_count": {
                      "description": "Present on the file-deletion refusal.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Either a rule with this id already exists, or a concurrent update changed the rule (re-read and retry)."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Update a control rule",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/controls/vocabulary": {
      "get": {
        "description": "Machine-readable rule config schemas with validated examples, supported scopes, plan requirements, and live location/data-handling vocabulary. Read this before creating rules. Requires controls:read.",
        "operationId": "userGetControlVocabulary",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read rule vocabulary",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes": {
      "get": {
        "description": "Lists routes in the calling organization, including whether drafts differ from the deployed version. Requires the `dynamic_routes:read` scope. meta.default_classifier_chain is the model chain a classifier uses when it does not pin one. meta.default_first_token_timeout_ms is the first-token timeout a model or pool node runs on when its arguments state none. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userListManagementDynamicRoutes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DynamicRoute"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "List dynamic routes",
        "tags": [
          "User delegation"
        ]
      },
      "post": {
        "description": "Creates a route draft. Omit graph to seed a complete default graph, then use data.draft.graph as a starting point. Empty graphs are invalid. Omit deploy or set deploy=false to keep the route unpublished; deploy=true changes live routing immediately. Review data.draft.validation, save changes with update_dynamic_route_draft, then use simulate_dynamic_route without version_number to test the draft before deploy_dynamic_route. Optional display_name is a human label separate from the route identifier; it preserves case and spaces. Invoke a deployed route with model=dynamic/\u003cname\u003e; invocation_model contains the exact string. Requires the `dynamic_routes:write` scope.\n\nGraph format: an object with an `elements` array. Each element has a unique `id`, a `type`, optional `properties`, and `outputs`, an object mapping output names to `{\"elementId\":\"target-node-id\"}`. Include `id: START, type: start` and `id: END, type: end`; `input` and `output` are not node types. A minimal deployable graph (replace the model with an available catalog ID permitted by your policy):\n```json\n{\"elements\":[{\"id\":\"START\",\"type\":\"start\",\"outputs\":{\"next\":{\"elementId\":\"primary\"}}},{\"id\":\"primary\",\"type\":\"model\",\"properties\":{\"model\":\"cerebras/gpt-oss-120b\"},\"outputs\":{\"success\":{\"elementId\":\"END\"},\"fallback\":{\"elementId\":\"END\"}}},{\"id\":\"END\",\"type\":\"end\",\"outputs\":{}}]}\n```\n\nSupported node types and properties:\n- `start`: the START node; `outputs.next` selects the first node.\n- `end`: the END node; `outputs` is `{}`.\n- `model`: `properties.model` is a catalog model ID. `outputs.success` targets END or an observe node; `outputs.fallback` targets another model, pool, or END.\n- `pool`: `properties.models` contains 2-10 `{model,metrics}` candidates; `properties.expression` is a numeric CEL expression such as `model.cost`, sorted ascending. Uses the same success/fallback outputs as model.\n- `conditional`: `properties.cases` contains `{id,expression}` entries; each expression is a CEL predicate over `metadata`, `auth`, and `input`. Connect an output for each case ID and a `default` output. The first true case wins.\n- `percentage`: `properties.buckets` contains at least two `{id,weight}` entries with positive integer weights totaling 100. Connect an output for each bucket ID.\n- `classifier`: `properties.cases` contains 2-10 `{id,label,instructions}` entries with unique labels, plus optional `context` and `model` properties. Connect an output per case ID; no default output. Classification failures fail the route.\n- `observe`: `properties.criteria` defines an asynchronous evaluation, with optional `score_type` (`score` or `binary`), `model`, `threshold`, and `sample_rate` (both greater than 0 and at most 1). Place after model/pool success or another observe node; `outputs.next` leads to another observe node or END.\n\nGraphs must be acyclic. Every node except END accepts at most one incoming edge; use separate model nodes on separate branches. Deployment requires each path from START to reach a model or pool before END. The route name is the model identifier on chat completions, responses, messages and native calls. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userCreateManagementDynamicRoute",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A route with this name already exists in the organization."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Create a dynamic route",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}": {
      "delete": {
        "description": "Soft-deletes the route. Calls to `dynamic/\u003cname\u003e` fail from the next request on. Requires the `dynamic_routes:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userDeleteManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Delete a dynamic route",
        "tags": [
          "User delegation"
        ]
      },
      "get": {
        "description": "Returns the route, draft graph, validation issues and active version. Requires the `dynamic_routes:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userGetManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Get a dynamic route",
        "tags": [
          "User delegation"
        ]
      },
      "patch": {
        "description": "Updates current route presentation metadata without validating or changing the draft graph, incrementing its revision, or deploying a version. display_name preserves case, spaces and Unicode; boundary whitespace is trimmed. Empty clears the label; omission, null, control characters, unknown fields and labels longer than 128 characters are rejected. The route identifier and invocation_model are unchanged. Restore and rollback preserve the current label. Requires the `dynamic_routes:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userUpdateManagementDynamicRouteMetadata",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteMetadataRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Update a dynamic route's display name",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/deploy": {
      "post": {
        "description": "Validates the row-locked current draft and deploys it as a new immutable version, changing live routing. Optional expected_route_uuid, expected_draft_revision and expected_active_version_number bind the operation to the reviewed identity, draft and live pointer; zero active version means unpublished. A mismatch returns 409. Supply a fresh idempotency_key for each new deployment and reuse identical arguments only to retry that operation. A replay returns the original version in meta.deployed_version and current observational data without reactivating the original version or validating a later draft. meta.idempotency_replayed identifies replays. The receipt can also be recovered by the read-only deployments/{idempotency_key} endpoint. Requires the `dynamic_routes:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userDeployManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteDeployRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A route identity, draft or live pointer precondition failed; the operation key conflicts with a different request; or the original route was deleted and recreated."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached. Existing receipts remain replayable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Deploy the draft",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/deployments": {
      "post": {
        "description": "Fail-closed deployment contract for infrastructure clients. expected_route_uuid (nonzero), expected_draft_revision, expected_active_version_number and idempotency_key are all required. Validates the row-locked reviewed draft and publishes one immutable version only if the reviewed identity and live pointer still match. Zero active version means unpublished. Missing preconditions are rejected before mutation. The separate path is absent on older backends, so clients must not fall back to /deploy when it is unavailable. Reusing identical arguments and the same key returns the original version without reactivating it; use a fresh key for every new deployment. meta.deployed_version is the original affected version and data is current observational state. Requires the `dynamic_routes:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userCreateManagementDynamicRouteDeployment",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteCreateDeploymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A reviewed route identity, draft or active pointer changed; the operation key conflicts; or the original route was replaced."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached; existing operations remain replayable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Create a guarded route deployment",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/deployments/{idempotency_key}": {
      "get": {
        "description": "Pure read of a completed deployment operation belonging to the same organization and authenticated actor. Returns the original immutable version in meta.deployed_version and the current observational route detail in data; it never activates a version, changes a draft or creates a receipt. Returns 404 when no matching completed receipt exists; a deleted-and-recreated route identity returns 409. Requires the `dynamic_routes:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userGetManagementDynamicRouteDeployment",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Deployment operation identifier",
            "in": "path",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The receipt belongs to a different route identity."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read a deployment operation receipt",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/draft": {
      "put": {
        "description": "Saves draft changes without deploying. Omitted description, graph and layout are preserved; an empty description clears it. Supply the complete graph to replace it. Structural errors reject the save; inspect meta.issues and data.draft.validation for remaining issues before deployment. Use simulate_dynamic_route without version_number to test the saved draft; deploy_dynamic_route performs full deployment validation. Requires the `dynamic_routes:write` scope.\n\nGraph format: an object with an `elements` array. Each element has a unique `id`, a `type`, optional `properties`, and `outputs`, an object mapping output names to `{\"elementId\":\"target-node-id\"}`. Include `id: START, type: start` and `id: END, type: end`; `input` and `output` are not node types. A minimal deployable graph (replace the model with an available catalog ID permitted by your policy):\n```json\n{\"elements\":[{\"id\":\"START\",\"type\":\"start\",\"outputs\":{\"next\":{\"elementId\":\"primary\"}}},{\"id\":\"primary\",\"type\":\"model\",\"properties\":{\"model\":\"cerebras/gpt-oss-120b\"},\"outputs\":{\"success\":{\"elementId\":\"END\"},\"fallback\":{\"elementId\":\"END\"}}},{\"id\":\"END\",\"type\":\"end\",\"outputs\":{}}]}\n```\n\nSupported node types and properties:\n- `start`: the START node; `outputs.next` selects the first node.\n- `end`: the END node; `outputs` is `{}`.\n- `model`: `properties.model` is a catalog model ID. `outputs.success` targets END or an observe node; `outputs.fallback` targets another model, pool, or END.\n- `pool`: `properties.models` contains 2-10 `{model,metrics}` candidates; `properties.expression` is a numeric CEL expression such as `model.cost`, sorted ascending. Uses the same success/fallback outputs as model.\n- `conditional`: `properties.cases` contains `{id,expression}` entries; each expression is a CEL predicate over `metadata`, `auth`, and `input`. Connect an output for each case ID and a `default` output. The first true case wins.\n- `percentage`: `properties.buckets` contains at least two `{id,weight}` entries with positive integer weights totaling 100. Connect an output for each bucket ID.\n- `classifier`: `properties.cases` contains 2-10 `{id,label,instructions}` entries with unique labels, plus optional `context` and `model` properties. Connect an output per case ID; no default output. Classification failures fail the route.\n- `observe`: `properties.criteria` defines an asynchronous evaluation, with optional `score_type` (`score` or `binary`), `model`, `threshold`, and `sample_rate` (both greater than 0 and at most 1). Place after model/pool success or another observe node; `outputs.next` leads to another observe node or END.\n\nGraphs must be acyclic. Every node except END accepts at most one incoming edge; use separate model nodes on separate branches. Deployment requires each path from START to reach a model or pool before END. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userUpdateManagementDynamicRouteDraft",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "issues": {
                          "items": {
                            "$ref": "#/components/schemas/DynamicRouteValidationIssue"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Replace the draft",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/simulate": {
      "post": {
        "description": "Omit version_number or set it to null to simulate the current draft, including an unpublished route. To simulate history, supply a positive version_number from list_dynamic_route_versions. Zero is invalid and does not mean draft. Minimal draft call: {\"name\":\"support\",\"version_number\":null}. Optional input and metadata supply request context; overrides.model_outcomes maps model/pool node IDs to success or fallback, and overrides.classifier_cases maps classifier node IDs to case IDs. For example {\"name\":\"support\",\"version_number\":null,\"overrides\":{\"model_outcomes\":{\"primary\":\"success\"}}} tests the documented example graph. May call a live classifier when no override is provided; does not deploy or invoke the selected final model. Inspect data.status and data.path for the routing verdict. Fix draft issues with update_dynamic_route_draft before deployment. Requires the `dynamic_routes:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userSimulateManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteSimulateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteSimulationResult"
                    },
                    "meta": {
                      "properties": {
                        "target": {
                          "description": "What was simulated: {\"kind\":\"draft\"} or {\"kind\":\"version\",\"version_number\":\u003cn\u003e}.",
                          "properties": {
                            "kind": {
                              "enum": [
                                "draft",
                                "version"
                              ],
                              "type": "string"
                            },
                            "version_number": {
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Simulate a request through the route",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/undeploy": {
      "post": {
        "description": "Clears only the current active version pointer. The draft and immutable version history are preserved. Optional expected_route_uuid and expected_active_version_number protect the identity and live pointer; zero means already unpublished. A positive expected version conflicts when the route is now unpublished. Use a fresh idempotency_key per new operation and retry identical arguments only; replays return the original affected version without clearing any newer deployment. data is the current observational route detail. Requires the `dynamic_routes:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userUndeployManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteUndeployRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "idempotency_replayed": {
                          "type": "boolean"
                        },
                        "undeployed_version": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/DynamicRouteVersion"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "undeployed_version_number": {
                          "description": "Original affected version; zero for an already-unpublished no-op.",
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A route identity/live pointer precondition or operation receipt conflicts."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Durable operation receipt limit reached; existing operations remain replayable."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Unpublish a dynamic route",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/versions": {
      "get": {
        "description": "Lists immutable deployed-version summaries for a route. Requires the `dynamic_routes:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userListManagementDynamicRouteVersions",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DynamicRouteVersionSummary"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "List a route's versions",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/versions/{version_number}": {
      "get": {
        "description": "Returns a historical deployed version, including its graph and layout. Requires the `dynamic_routes:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userGetManagementDynamicRouteVersion",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Version number, from 1",
            "in": "path",
            "name": "version_number",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteVersion"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Get a version",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/versions/{version_number}/restore-to-draft": {
      "post": {
        "description": "Replaces the current draft with a historical version without changing live routing. Review the returned draft validation, then simulate the draft by omitting version_number before explicitly deploying. Requires the `dynamic_routes:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userRestoreManagementDynamicRouteVersionToDraft",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Version number, from 1",
            "in": "path",
            "name": "version_number",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Copy a version into the draft",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/dynamic-routes/{name}/versions/{version_number}/rollback": {
      "post": {
        "description": "Publishes a historical version as a new deployed version and changes live routing immediately. Returns the new version in meta.deployed_version. Requires the `dynamic_routes:write` scope. The draft is left unchanged. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userRollbackManagementDynamicRoute",
        "parameters": [
          {
            "description": "Route name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Version number, from 1",
            "in": "path",
            "name": "version_number",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicRouteRollbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DynamicRouteDetail"
                    },
                    "meta": {
                      "properties": {
                        "deployed_version": {
                          "$ref": "#/components/schemas/DynamicRouteVersion"
                        },
                        "idempotency_replayed": {
                          "description": "True when returning the original operation's version without changing the current live pointer.",
                          "type": "boolean"
                        },
                        "model_access_locks": {
                          "description": "Present when projects of the organization hold a Model access lock. In those projects the route can send a call only to models on the locked routes; a call it sends to any other model is refused. The deploy itself is not refused.",
                          "properties": {
                            "locked_projects": {
                              "description": "How many projects of the organization hold a lock.",
                              "type": "integer"
                            },
                            "message": {
                              "type": "string"
                            },
                            "project_uuids": {
                              "items": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The draft parses but fails validation (the issues are on the route's draft.validation), so it cannot be deployed or simulated."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Roll back to a version",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/feedback": {
      "post": {
        "description": "Send general feedback to the Opper team: something missing (a model, a feature), unclear or wrong in the docs, a bug you noticed in passing, or something that worked well. A person reads it, but it is not a support channel and gets no reply: for a problem that blocks you or needs an answer, tell the user to open Support in the Opper platform (https://platform.opper.ai, bottom of the left sidebar). Include request_id, model, endpoint and error in context when you have them. Never include API keys, passwords or personal data. Returns an id. Requires no account connection.",
        "operationId": "userSendFeedback",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "agent": {
                    "additionalProperties": false,
                    "description": "Who is sending. Every field is optional.",
                    "properties": {
                      "name": {
                        "description": "Agent or client name.",
                        "maxLength": 200,
                        "type": "string"
                      },
                      "operator_contact": {
                        "description": "Email or URL where the person running you can be reached, only if they want a reply. Stored as given and not verified.",
                        "maxLength": 200,
                        "type": "string"
                      },
                      "version": {
                        "description": "Agent or client version.",
                        "maxLength": 200,
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "context": {
                    "additionalProperties": false,
                    "description": "Where it happened. Every field is optional.",
                    "properties": {
                      "endpoint": {
                        "description": "API endpoint or MCP tool involved, for example /v3/compat/chat/completions.",
                        "maxLength": 2000,
                        "type": "string"
                      },
                      "error": {
                        "description": "The error message you got.",
                        "maxLength": 2000,
                        "type": "string"
                      },
                      "model": {
                        "description": "Model id involved.",
                        "maxLength": 200,
                        "type": "string"
                      },
                      "request_id": {
                        "description": "Any id from the failing call, if you have one.",
                        "maxLength": 200,
                        "type": "string"
                      },
                      "url": {
                        "description": "Page or docs URL involved.",
                        "maxLength": 2000,
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "kind": {
                    "default": "other",
                    "description": "What this is about. Defaults to other.",
                    "enum": [
                      "bug",
                      "feature_request",
                      "model_request",
                      "docs",
                      "praise",
                      "other"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "description": "What happened or what you need, in plain text.",
                    "maxLength": 8000,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "description": "Feedback id, for example fb_01J...",
                          "type": "string"
                        },
                        "ignored_fields": {
                          "description": "Fields that were sent but not used.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "message": {
                          "type": "string"
                        },
                        "removed_before_storage": {
                          "description": "Kinds of data removed before storage (credentials, emails and so on).",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "status": {
                          "description": "received once stored.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "status"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "meta",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "Send general feedback to the Opper team",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/guides/{topic}": {
      "get": {
        "description": "Public, versioned recipes for getting_started, connect_app, structured_output, rules, and debugging. Each guide names live MCP tools and links to the current docs. Examples use placeholders; discover actual projects, keys and callable model IDs rather than copying placeholder values. Requires no account connection.",
        "operationId": "userGetGuide",
        "parameters": [
          {
            "description": "Which guide to return: getting_started, connect_app, structured_output, rules, debugging or media (images and video).",
            "in": "path",
            "name": "topic",
            "required": true,
            "schema": {
              "enum": [
                "getting_started",
                "connect_app",
                "structured_output",
                "rules",
                "debugging",
                "media"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "Get an Opper integration or troubleshooting guide",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/models": {
      "get": {
        "description": "Search the public model catalog before or after connecting. All arguments are optional. Start with {\"type\":\"llm\",\"limit\":3} for a few text models, or {\"limit\":3} for any models. Rows are summaries: id, name, type, model, maker, provider, service_tier, capabilities, modalities, context_window, max_output_tokens, pricing, compliance (inference_location, training, logging), release date, access, retired_at and successor. For one model's full record (parameters, every compliance fact, references) pass detail=\"full\" with q or model; it returns at most 3 rows. Pages hold 20 rows by default and at most 30, and end early rather than pass 40,000 characters, so a page can hold fewer rows than asked for. Each page starts with total, has_more and next_offset: while has_more is true, call again with offset set to next_offset. Narrow with type, provider, capability or q rather than paging everything. Omit unused filters; never send the strings \"undefined\" or \"null\", which are literal filters and can hide all results. If a filtered search is empty, retry with only limit before concluding the catalog is empty. To find models that run in the EU pass inference_location=[\"EU\"], and add storage_location=[\"EU\"] to keep retained content there too. For No training and No logging on the Rules page pass training=[\"no\"] and logging=[\"none\"], and add moderation=[\"none\"] for No provider moderation. These filters match the way Rules do; each parameter says how an unrecorded fact is treated. include takes only maker,benchmarks; get_allowed_models gives effective policy. The callable id selects an endpoint; model names the underlying weights, which several endpoints can share. For comply.allowlist.models, remove only the first provider prefix from id (gemini/gemma-4-26b-moe becomes gemma-4-26b-moe). pricing holds USD rates; no pricing object means a free-priced model under the runtime plan gate. For image, video or tts start with featured=true, the curated current models. Listing does not guarantee credentials, entitlement or policy access.",
        "operationId": "userListModels",
        "parameters": [
          {
            "description": "Comma-separated public enrichments: maker,benchmarks (summary rows keep benchmarks). Use get_allowed_models for effective policy. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "maker,benchmarks",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of a model's id, name, description or alias. Dots, dashes, underscores, colons, slashes and spaces are also ignored on both sides from the start of a word, so `gpt-5-1`, `gpt 5.1` and `gpt5.1` all find `gpt-5.1`. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "q",
            "schema": {
              "example": "claude-sonnet",
              "type": "string"
            }
          },
          {
            "description": "Filter by provider (company) slug as published in each item's `provider.slug` and on `/v3/providers` (e.g. `openai`, `anthropic`, `google`). Adapter keys like `vertexai` are not companies and match nothing. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by model type (`llm`, `image`, `tts`, `stt`, `video`, `realtime`, `embedding`, `rerank`, `ocr`, `evaluation`, `extraction`, `forecast`, `music`, `sound`). Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Keep the endpoints of one model, by the canonical key each item carries as `model` (e.g. `kimi-k3`), exact match. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "model",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true keeps the short, hand-curated list of current models per type that Opper features. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "featured",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Keep endpoints of these processing tiers, comma-separated: `flex`, `priority` (alias `fast`), `ultrafast`, `economy`, `batch` (served by POST /v3/batches only), `background_2h` / `background_8h` (a discounted Responses background run that completes within the window), or `default` for standard endpoints. Each tier endpoint carries its tier as `service_tier` and its own price; request one with the `service_tier` field or by its id. E.g. `?service_tier=flex` lists every model sold at flex, `?model=kimi-k3\u0026service_tier=priority` the priority endpoints of one model. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "service_tier",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by capability (repeatable). Items matching ALL listed capabilities are returned. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "capability",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models that take ALL of these inputs, comma-separated: `text`, `image`, `file`, `pdf`, `audio`, `video`. Each item lists what it takes as `input_modalities`; a model without recorded modalities matches no modality filter. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "input_modalities",
            "schema": {
              "example": "image,audio",
              "type": "string"
            }
          },
          {
            "description": "Keep models that give back ANY of these outputs, comma-separated: `text`, `image`, `embeddings`, `audio`, `video`, `rerank`, `decisions`, `speech`, `transcription`, or `all` for no filter. Each item lists what it gives back as `output_modalities`. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "output_modalities",
            "schema": {
              "example": "speech,transcription",
              "type": "string"
            }
          },
          {
            "description": "Keep models whose inference runs inside any of these locations. Matches like Inference location on the Rules page: `EU` includes a model running in Sweden, and a model with no recorded location only matches `GLOBAL`. Each item reports its location as `compliance.inference_location`. Values come from the catalog's location list: the ISO 3166-1 alpha-2 codes of the countries providers serve from, and the areas `EU`, `EEA` and `GLOBAL`. A country missing from the list has no model recorded in it. Repeatable, or comma-separated. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "inference_location",
            "schema": {
              "items": {
                "enum": [
                  "AE",
                  "AR",
                  "AT",
                  "AU",
                  "BE",
                  "BG",
                  "BH",
                  "BR",
                  "CA",
                  "CH",
                  "CL",
                  "CN",
                  "CY",
                  "CZ",
                  "DE",
                  "DK",
                  "EE",
                  "EEA",
                  "EG",
                  "ES",
                  "EU",
                  "FI",
                  "FR",
                  "GB",
                  "GLOBAL",
                  "GR",
                  "HK",
                  "HR",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IN",
                  "IS",
                  "IT",
                  "JP",
                  "KE",
                  "KR",
                  "KW",
                  "LI",
                  "LT",
                  "LU",
                  "LV",
                  "MT",
                  "MX",
                  "MY",
                  "NG",
                  "NL",
                  "NO",
                  "NZ",
                  "PH",
                  "PL",
                  "PT",
                  "QA",
                  "RO",
                  "RS",
                  "SA",
                  "SE",
                  "SG",
                  "SI",
                  "SK",
                  "TH",
                  "TR",
                  "TW",
                  "UA",
                  "US",
                  "VN",
                  "ZA"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider stores retained content (logs, content retained for moderation) only inside these locations. Matches like Storage location on the Rules page, by the same containment as `inference_location`. A model whose provider keeps no content (no logs, nothing retained for moderation, no training on it by default) matches any location. Values come from the catalog's location list: the ISO 3166-1 alpha-2 codes of the countries providers serve from, and the areas `EU`, `EEA` and `GLOBAL`. A country missing from the list has no model recorded in it. Repeatable, or comma-separated. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "storage_location",
            "schema": {
              "items": {
                "enum": [
                  "AE",
                  "AR",
                  "AT",
                  "AU",
                  "BE",
                  "BG",
                  "BH",
                  "BR",
                  "CA",
                  "CH",
                  "CL",
                  "CN",
                  "CY",
                  "CZ",
                  "DE",
                  "DK",
                  "EE",
                  "EEA",
                  "EG",
                  "ES",
                  "EU",
                  "FI",
                  "FR",
                  "GB",
                  "GLOBAL",
                  "GR",
                  "HK",
                  "HR",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IN",
                  "IS",
                  "IT",
                  "JP",
                  "KE",
                  "KR",
                  "KW",
                  "LI",
                  "LT",
                  "LU",
                  "LV",
                  "MT",
                  "MX",
                  "MY",
                  "NG",
                  "NL",
                  "NO",
                  "NZ",
                  "PH",
                  "PL",
                  "PT",
                  "QA",
                  "RO",
                  "RS",
                  "SA",
                  "SE",
                  "SG",
                  "SI",
                  "SK",
                  "TH",
                  "TR",
                  "TW",
                  "UA",
                  "US",
                  "VN",
                  "ZA"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider's training stance is one of `no`, `yes`. Repeatable, or comma-separated. A stance that has not been researched never matches. `training=no` is No training on the Rules page. Each item reports its stance as `compliance.training`. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "training",
            "schema": {
              "items": {
                "enum": [
                  "no",
                  "yes"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider's logging stance is one of `none`, `abuse_monitoring`, `limited_debug`, `other`. Repeatable, or comma-separated. A stance that has not been researched never matches. `logging=none` is No logging on the Rules page. Each item reports its stance as `compliance.logging`. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "logging",
            "schema": {
              "items": {
                "enum": [
                  "none",
                  "abuse_monitoring",
                  "limited_debug",
                  "other"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider's moderation stance is one of `none`, `optional`, `default_on`, `mandatory`. Repeatable, or comma-separated. A stance that has not been researched never matches. `moderation=none` is No provider moderation on the Rules page. Each item reports its stance as `compliance.moderation`. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "moderation",
            "schema": {
              "items": {
                "enum": [
                  "none",
                  "optional",
                  "default_on",
                  "mandatory"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose `context_window` is at least this many tokens, e.g. `200000`. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "min_context_window",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Keep token-priced models whose base input price (`pricing.input[0]`, USD per million tokens) is at most this. Models not priced per token are left out. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "max_input_price",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Keep token-priced models whose base output price (`pricing.output[0]`, USD per million tokens) is at most this. Models not priced per token are left out. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "max_output_price",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Keep endpoints Opper measured at no fewer than this many output tokens per second on its own traffic (see `include=performance`). Unmeasured endpoints are left out. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "min_tokens_per_second",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Keep endpoints whose measured median time to first token is at most this many milliseconds (see `include=performance`). Unmeasured endpoints are left out. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "max_ttft_ms",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Set to `true` to include retired models in results. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "deprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Field to sort by (`id`, `name`, `provider`, `type`, `cost`, `speed`, `quality`, `context_window`, `ttft`, `tokens_per_second`). Default `id`. `speed` and `quality` are editorial tiers; `ttft` and `tokens_per_second` are measured on Opper traffic, and unmeasured endpoints sort last in either order, so `?sort=tokens_per_second\u0026order=desc` lists the fastest first. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "id",
              "type": "string"
            }
          },
          {
            "description": "`asc` (default) or `desc`. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "order",
            "schema": {
              "default": "asc",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Page size, 1 to 30, default 20 (detail=full: at most 3). A larger value is capped, and 0 or less means the default, never the whole catalog. A page ends early rather than pass 40,000 characters; has_more and next_offset then say where to continue. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "maximum": 30,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "summary (default) or full. Full rows add parameter schemas, every compliance fact, references and descriptions, and a full page holds at most 3 rows: use it with q or model for one model. Optional: omit when unused. Do not use the strings undefined or null as placeholders.",
            "in": "query",
            "name": "detail",
            "schema": {
              "default": "summary",
              "enum": [
                "summary",
                "full"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Model-Catalog-Version": {
                "description": "Database catalog version of the immutable serving-registry snapshot used for this response. Consumers combining callable and unavailable model feeds should only combine matching versions.",
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "X-Opper-Model-Corrections-Version": {
                "description": "Version of the accepted provider corrections applied to the routes in this response, from the same serving-registry snapshot as the catalog version. It moves when a correction is accepted, which the catalog version does not. Zero when none are applied.",
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List models",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/models/access": {
      "get": {
        "description": "Read-only preflight for an exact callable text model ID from list_models and optional project UUID. Checks plan, provider entitlement, effective policy and billing without inference or a paid probe. Requires account:read. Policy is marked requires_authorization when controls:read is missing. Missing billing/provider information stays unknown; no_known_blockers is a snapshot and never guarantees a successful runtime call. Without a project UUID, project policy and spend caps are not assessed. Dynamic routes and BYOK models are outside this public-catalog preflight.",
        "operationId": "userCheckModelAccess",
        "parameters": [
          {
            "description": "Exact callable model ID (chat, image, video or speech) returned by list_models.",
            "in": "query",
            "name": "model",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "Optional project UUID within the authorized organization. Omit for organization-only checks.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "allOf": [
                        {
                          "if": {
                            "properties": {
                              "status": {
                                "const": "blocked"
                              }
                            },
                            "required": [
                              "status"
                            ]
                          },
                          "then": {
                            "properties": {
                              "blockers": {
                                "minItems": 1
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "status": {
                                "const": "incomplete"
                              }
                            },
                            "required": [
                              "status"
                            ]
                          },
                          "then": {
                            "properties": {
                              "blockers": {
                                "maxItems": 0
                              },
                              "unknown_account_checks": {
                                "minItems": 1
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "status": {
                                "const": "no_known_blockers"
                              }
                            },
                            "required": [
                              "status"
                            ]
                          },
                          "then": {
                            "properties": {
                              "blockers": {
                                "maxItems": 0
                              },
                              "unknown_account_checks": {
                                "maxItems": 0
                              }
                            }
                          }
                        }
                      ],
                      "properties": {
                        "blockers": {
                          "description": "Machine-readable reasons for known account blockers.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "checks": {
                          "additionalProperties": true,
                          "properties": {
                            "billing": {
                              "additionalProperties": true,
                              "properties": {
                                "message": {
                                  "type": "string"
                                },
                                "reason": {
                                  "description": "Optional machine-readable reason; null means no reason was supplied by the underlying check.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "snapshot": {
                                  "additionalProperties": true,
                                  "allOf": [
                                    {
                                      "if": {
                                        "properties": {
                                          "status": {
                                            "const": "available"
                                          }
                                        },
                                        "required": [
                                          "status"
                                        ]
                                      },
                                      "then": {
                                        "required": [
                                          "currency",
                                          "balance_cents",
                                          "blocked",
                                          "scope",
                                          "blocked_scope",
                                          "spend_status"
                                        ]
                                      }
                                    },
                                    {
                                      "if": {
                                        "properties": {
                                          "spend_status": {
                                            "const": "available"
                                          }
                                        },
                                        "required": [
                                          "spend_status"
                                        ]
                                      },
                                      "then": {
                                        "required": [
                                          "spent_cents"
                                        ]
                                      }
                                    }
                                  ],
                                  "properties": {
                                    "balance_cents": {
                                      "description": "Organization funding balance in US cents; not model-specific runtime eligibility.",
                                      "type": "integer"
                                    },
                                    "block_reason": {
                                      "type": "string"
                                    },
                                    "blocked": {
                                      "description": "Funding snapshot verdict within blocked_scope. A free-priced model still needs its own runtime-gate preflight.",
                                      "type": "boolean"
                                    },
                                    "blocked_scope": {
                                      "enum": [
                                        "organization_only",
                                        "organization_and_project"
                                      ],
                                      "type": "string"
                                    },
                                    "currency": {
                                      "const": "USD",
                                      "type": "string"
                                    },
                                    "note": {
                                      "type": "string"
                                    },
                                    "period_end": {
                                      "format": "date-time",
                                      "type": "string"
                                    },
                                    "period_start": {
                                      "format": "date-time",
                                      "type": "string"
                                    },
                                    "project_spent_cents": {
                                      "description": "Selected project's spend in US cents, present only when project-scoped.",
                                      "type": "integer"
                                    },
                                    "reason": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "const": "organization",
                                      "type": "string"
                                    },
                                    "spend_status": {
                                      "enum": [
                                        "available",
                                        "unknown"
                                      ],
                                      "type": "string"
                                    },
                                    "spent_cents": {
                                      "description": "Organization spend in US cents for the returned billing period; not an invoice.",
                                      "type": "integer"
                                    },
                                    "status": {
                                      "description": "Unknown is not evidence of credits or permission to incur costs.",
                                      "enum": [
                                        "available",
                                        "unknown"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ],
                                  "type": "object"
                                },
                                "status": {
                                  "enum": [
                                    "allowed",
                                    "blocked",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status"
                              ],
                              "type": "object"
                            },
                            "entitlement": {
                              "additionalProperties": true,
                              "properties": {
                                "message": {
                                  "type": "string"
                                },
                                "reason": {
                                  "description": "Optional machine-readable reason; null means no reason was supplied by the underlying check.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "enum": [
                                    "allowed",
                                    "blocked",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status"
                              ],
                              "type": "object"
                            },
                            "plan": {
                              "additionalProperties": true,
                              "properties": {
                                "free_priced": {
                                  "description": "Whether the selected catalog model is free-priced.",
                                  "type": "boolean"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "plan": {
                                  "type": "string"
                                },
                                "reason": {
                                  "description": "Optional machine-readable reason; null means no reason was supplied by the underlying check.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "enum": [
                                    "allowed",
                                    "blocked",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status"
                              ],
                              "type": "object"
                            },
                            "policy": {
                              "additionalProperties": true,
                              "properties": {
                                "message": {
                                  "type": "string"
                                },
                                "reason": {
                                  "description": "Optional machine-readable reason; null means no reason was supplied by the underlying check.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "required_scope": {
                                  "const": "controls:read",
                                  "type": "string"
                                },
                                "scope": {
                                  "enum": [
                                    "organization",
                                    "organization_and_project"
                                  ],
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "allowed",
                                    "blocked",
                                    "unknown",
                                    "requires_authorization"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status"
                              ],
                              "type": "object"
                            },
                            "provider_availability": {
                              "additionalProperties": true,
                              "properties": {
                                "message": {
                                  "type": "string"
                                },
                                "reason": {
                                  "description": "Optional machine-readable reason; null means no reason was supplied by the underlying check.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "enum": [
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status"
                              ],
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        "inference_performed": {
                          "const": false,
                          "type": "boolean"
                        },
                        "links": {
                          "additionalProperties": true,
                          "properties": {
                            "billing": {
                              "description": "Open the authorized organization's billing page.",
                              "format": "uri",
                              "type": "string"
                            },
                            "connections": {
                              "description": "Review or disconnect agent connections in the browser.",
                              "format": "uri",
                              "type": "string"
                            },
                            "rules": {
                              "description": "Open the authorized organization's rules page.",
                              "format": "uri",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "model": {
                          "description": "Resolved callable public text-model ID.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "next_actions": {
                          "description": "Suggested steps to address blockers or continue with an authorized runtime call.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "project": {
                          "additionalProperties": true,
                          "properties": {
                            "id": {
                              "description": "Selected project UUID, validated within the connected organization.",
                              "format": "uuid",
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "type": "object"
                        },
                        "runtime_success_guaranteed": {
                          "const": false,
                          "type": "boolean"
                        },
                        "status": {
                          "description": "Blocked takes precedence over unknown account checks. no_known_blockers does not verify the provider or authorize a runtime call.",
                          "enum": [
                            "blocked",
                            "incomplete",
                            "no_known_blockers"
                          ],
                          "type": "string"
                        },
                        "unknown_account_checks": {
                          "description": "Account checks whose outcome could not be established, including missing authorization.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "unverified_checks": {
                          "description": "Checks not performed by this preflight, including provider availability and inference key validity.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "model",
                        "status",
                        "checks",
                        "blockers",
                        "unknown_account_checks",
                        "unverified_checks",
                        "links",
                        "next_actions",
                        "inference_performed",
                        "runtime_success_guaranteed"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  "required": [
                    "meta",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Check model access for the connected account",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects": {
      "get": {
        "description": "Lists every project in the calling organization. Requires the `projects:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userListManagementProjects",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementProject"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "List projects",
        "tags": [
          "User delegation"
        ]
      },
      "post": {
        "description": "Creates a project with Organization access in the calling organization. Requires the `projects:write` scope. For an atomic initial Restricted policy use the dedicated /management/v1/projects/with-access operation; access fields are not accepted here. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userCreateManagementProject",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProject"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A project with this name already exists in the organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Create a project",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}": {
      "delete": {
        "description": "Soft-deletes the project and permanently deletes every inference key bound to it. Requires the `projects:delete` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userDeleteManagementProject",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Delete a project",
        "tags": [
          "User delegation"
        ]
      },
      "get": {
        "description": "Fetches one project by UUID. Requires the `projects:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userGetManagementProject",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProject"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Get a project",
        "tags": [
          "User delegation"
        ]
      },
      "patch": {
        "description": "Updates a project's name and/or description. Omit a field to leave it unchanged; send `\"description\": null` to clear it. An empty body is rejected. Retention is not settable here — it is a control-plane setting, managed through `/management/v1/controls/rules`. Requires the `projects:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userUpdateManagementProject",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateManagementProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementProject"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A project with this name already exists in the organization."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Update a project",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys": {
      "get": {
        "description": "Lists the inference keys bound to a project. Only the key prefix is returned — the full key is shown once, at creation. Requires the `apikeys:read` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userListManagementAPIKeys",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ManagementAPIKey"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "List a project's API keys",
        "tags": [
          "User delegation"
        ]
      },
      "post": {
        "description": "Mints an inference key for the project. The full key is returned only on initial creation when return_secret is not false; the user MCP tool defaults false. Optional `allowed_ips` restricts the key to those addresses. Each entry is an IP address or CIDR range (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only, up to 100 entries, ranges no wider than /8 (IPv4) or /16 (IPv6). An empty list accepts calls from any IP. Calls from any other address get 403 with code `ip_not_allowed`. A change takes up to a minute to apply. Reuse idempotency_key with identical arguments after uncertain results. A replay returns existing metadata without a secret; changed arguments or a deleted key return 409. Requires the `apikeys:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userCreateManagementAPIKey",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementAPIKey"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Idempotent replay: existing API key metadata without the secret."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateManagementAPIKeyResponse"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The idempotency key was used with different arguments or its API key was deleted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Mint an API key",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys/{id}": {
      "delete": {
        "description": "Permanently deletes an inference key. Requires the `apikeys:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userDeleteManagementAPIKey",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Delete an API key",
        "tags": [
          "User delegation"
        ]
      },
      "patch": {
        "description": "Changes an inference key. Send `name`, `allowed_ips` or both: a field left out is not changed. `name` renames the key. `allowed_ips` replaces the IP allowlist, and `null` or `[]` clears it. Each entry is an IP address or CIDR range (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only, up to 100 entries, ranges no wider than /8 (IPv4) or /16 (IPv6). An empty list accepts calls from any IP. Calls from any other address get 403 with code `ip_not_allowed`. A change takes up to a minute to apply. A key held by an agent login cannot be renamed or have a list. Requires the `apikeys:write` scope. User delegation follows the current user's app permissions and feature entitlements.",
        "operationId": "userUpdateManagementAPIKey",
        "parameters": [
          {
            "description": "Project UUID",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateManagementAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementAPIKey"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "required_scope": {
                      "description": "Present on the scope refusal.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The token lacks the scope this endpoint requires (`required_scope` is returned). Presenting a runtime `op-…` key instead of a management `op-mak-…` token also lands here."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "No such resource in the calling organization. A resource belonging to another organization is indistinguishable from one that does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Rename an API key or set its allowed IPs",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys/{id}/audio/speech": {
      "post": {
        "description": "Turn text into speech with the selected project key. Unless the user names a model, pick from list_models type=tts featured=true, the curated current ones; a model's params lists voices and formats. The audio is saved to the project's files: the result carries audio.file_id and audio.url, a download link valid for 1 hour. The file stays until it is deleted on the platform's Files page or with DELETE /v3/files/{id}. Normal costs and policy checks apply. Requires runtime:call.",
        "operationId": "userGenerateSpeech",
        "parameters": [
          {
            "description": "Project UUID in the authorized organization",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key ID in this project; its secret is never returned",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "format": {
                    "description": "Audio format such as mp3 (default) or wav.",
                    "type": "string"
                  },
                  "input": {
                    "description": "The text to speak.",
                    "type": "string"
                  },
                  "model": {
                    "description": "Speech model id from list_models type=tts (featured=true for the curated ones).",
                    "type": "string"
                  },
                  "parameters": {
                    "description": "Provider settings, forwarded verbatim. Each model lists the keys it takes in params.tts.parameters (list_models detail=full).",
                    "type": "object"
                  },
                  "speed": {
                    "description": "Speaking rate, 1 is normal.",
                    "type": "number"
                  },
                  "voice": {
                    "description": "A voice the model lists.",
                    "type": "string"
                  }
                },
                "required": [
                  "model",
                  "input"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "audio": {
                      "properties": {
                        "file_id": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "id": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Generate speech",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys/{id}/chat/completions": {
      "post": {
        "description": "Call a model with chat messages using the selected project key. Normal inference costs and policy checks apply. Set stream=false. The returned meta.trace_uuid can be read with get_trace only when retention is enabled. Requires runtime:call.",
        "operationId": "userCallModel",
        "parameters": [
          {
            "description": "Project UUID in the authorized organization",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key ID in this project; its secret is never returned by this operation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Call a model with a project key",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys/{id}/images": {
      "post": {
        "description": "Generate one image, or edit one, with the selected project key. Unless the user names a model, pick from list_models type=image featured=true, the curated current ones; a model's params.image (detail=full) lists sizes, aspect ratios and qualities. Waits up to about 45 seconds: status completed carries url, a download link valid for 1 hour; status processing carries id for get_media_job. Identical calls return one job: for several versions, set variant 1, 2, 3. The result is deleted 24 hours after the job ends (1 hour on a zero-retention project) unless store is true. Normal costs and policy checks apply; usage.cost is the charge in USD. Requires runtime:call.",
        "operationId": "userGenerateImage",
        "parameters": [
          {
            "description": "Project UUID in the authorized organization",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key ID in this project; its secret is never returned",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "aspect_ratio": {
                    "description": "Shape such as 16:9, from params.image.aspect_ratios.",
                    "type": "string"
                  },
                  "image": {
                    "description": "Image to edit (needs the image_edit capability). An https URL or a file_\u003cid\u003e.",
                    "type": "string"
                  },
                  "model": {
                    "description": "Image model id from list_models type=image (featured=true for the curated ones).",
                    "type": "string"
                  },
                  "parameters": {
                    "description": "Provider settings, forwarded verbatim. Each model lists the keys it takes in params.image.parameters (list_models detail=full).",
                    "type": "object"
                  },
                  "prompt": {
                    "description": "What the image shows.",
                    "type": "string"
                  },
                  "quality": {
                    "description": "A tier from params.image.qualities.",
                    "type": "string"
                  },
                  "reference_images": {
                    "description": "Images the result draws on: subject, product or style. An https URL or a file_\u003cid\u003e.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "resolution": {
                    "description": "Output tier such as 1k or 2k, for models that declare one.",
                    "type": "string"
                  },
                  "size": {
                    "description": "Pixel size WxH, for models that take one.",
                    "type": "string"
                  },
                  "store": {
                    "description": "Also save the result to the project's files and return a reusable file_id. Default false: only a temporary link.",
                    "type": "boolean"
                  },
                  "variant": {
                    "description": "Version number.",
                    "type": "integer"
                  }
                },
                "required": [
                  "model",
                  "prompt"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "file_id": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "next": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "processing",
                        "completed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Generate an image",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys/{id}/media-jobs/{job_id}": {
      "get": {
        "description": "Read a generate_image or generate_video job with the key that started it. Waits up to about 45 seconds while it is processing. status completed: url (a download link valid for 1 hour from this call; call again for a fresh one), mime_type, usage, and file_id when the job stored its result. status failed: error. status processing: call again with the same id. The result is deleted 24 hours after the job ends (1 hour on a zero-retention project) unless store is true. Requires runtime:call.",
        "operationId": "userGetMediaJob",
        "parameters": [
          {
            "description": "Project UUID in the authorized organization",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key ID in this project; its secret is never returned",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "The id generate_image or generate_video returned.",
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "file_id": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "next": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "processing",
                        "completed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read a media job",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys/{id}/traces/{trace_id}": {
      "get": {
        "description": "Use this to read the trace of a call made with call_model and a project key; for a call made with call_model_with_org_key, use get_trace_with_org_key. Accepts a trace UUID or the span UUID returned in call_model meta.trace_uuid, resolved within the selected project. Traces exist only when a positive retention policy was enabled for the call; otherwise 404 is expected. Requires runtime:read.",
        "operationId": "userGetTrace",
        "parameters": [
          {
            "description": "Project UUID in the authorized organization",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key ID in this project; its secret is never returned by this operation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "A trace UUID, or the span UUID returned in call_model meta.trace_uuid; either is resolved within the selected project.",
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTraceResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read a trace with a project key",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/projects/{uuid}/api-keys/{id}/videos": {
      "post": {
        "description": "Start a video with the selected project key. Unless the user names a model, pick from list_models type=video featured=true, the curated current ones; a model's params.video (detail=full) lists durations, resolutions, aspect ratios and capabilities. A video takes from about 30 seconds to 30 minutes or more: this waits up to about 45 seconds, then returns status processing with id; call get_media_job with it until status is completed or failed. Identical calls return one job: for several versions, set variant 1, 2, 3. The result is deleted 24 hours after the job ends (1 hour on a zero-retention project) unless store is true. Normal costs and policy checks apply; usage.cost is the charge in USD. Requires runtime:call.",
        "operationId": "userGenerateVideo",
        "parameters": [
          {
            "description": "Project UUID in the authorized organization",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inference key ID in this project; its secret is never returned",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "aspect_ratio": {
                    "description": "Shape such as 16:9 or 9:16, from params.video.aspect_ratios.",
                    "type": "string"
                  },
                  "audio": {
                    "description": "Speech a talking avatar or lip-sync model follows (needs audio_to_video). An https URL or file_\u003cid\u003e.",
                    "type": "string"
                  },
                  "document": {
                    "description": "PDF the video is based on, an https URL or file_\u003cid\u003e (needs document_to_video); not with image or web_url.",
                    "type": "string"
                  },
                  "image": {
                    "description": "First frame to animate (needs image_to_video). An https URL or a file_\u003cid\u003e.",
                    "type": "string"
                  },
                  "last_image": {
                    "description": "Last frame the clip moves to (needs image and last_frame). An https URL or a file_\u003cid\u003e.",
                    "type": "string"
                  },
                  "model": {
                    "description": "Video model id from list_models type=video (featured=true for the curated ones).",
                    "type": "string"
                  },
                  "parameters": {
                    "description": "Provider settings, forwarded verbatim. Each model lists the keys it takes in params.video.parameters (list_models detail=full).",
                    "type": "object"
                  },
                  "prompt": {
                    "description": "What the clip shows; none on a lip-sync model.",
                    "type": "string"
                  },
                  "reference_audios": {
                    "description": "Voice, music or sound clips, cited as audio 1, audio 2 (needs reference_audio). An https URL or file_\u003cid\u003e.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "reference_images": {
                    "description": "Subject or character images to keep consistent, not frames (needs reference_images). An https URL or a file_\u003cid\u003e.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "reference_videos": {
                    "description": "More clips, cited as video 1, video 2 (needs reference_video). An https URL or file_\u003cid\u003e.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "resolution": {
                    "description": "Output tier such as 720p or 1080p, from params.video.resolutions.",
                    "type": "string"
                  },
                  "seconds": {
                    "description": "Clip length, within params.video.min_duration and max_duration.",
                    "minimum": 1,
                    "type": "integer"
                  },
                  "store": {
                    "description": "Also save the result to the project's files and return a reusable file_id. Default false: only a temporary link.",
                    "type": "boolean"
                  },
                  "variant": {
                    "description": "Version number.",
                    "type": "integer"
                  },
                  "video": {
                    "description": "Clip to extend, edit, re-voice or copy motion from (needs video_editing, video_extension or reference_video); it may be billed too. An https URL or file_\u003cid\u003e.",
                    "type": "string"
                  },
                  "web_url": {
                    "description": "Public https page to base the video on (needs webpage_to_video); not with image or document.",
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "file_id": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "next": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "processing",
                        "completed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Generate a video",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/traces": {
      "get": {
        "description": "List retained trace metadata in projects you can access in the connected organization. Omit project_uuid to include eligible projects and unassigned organization traces. All arguments are optional; start with {\"limit\":5}. Defaults to the last seven days, at most 31 days per request, newest trace IDs first. The window uses the earliest retained span in the trace's project scope. Returns names, project/trace UUIDs, timestamps, duration, generation count, error flag and scoped trace cost in USD. Follow meta.next_cursor with the same filters and returned from/to values. Use get_trace for retained detail and get_usage for usage across all calls, including zero-retention calls. Absence of traces does not mean no usage. Requires runtime:read.",
        "operationId": "userListTraces",
        "parameters": [
          {
            "description": "Optional project UUID you can access. Omit to include eligible projects and unassigned organization traces.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inclusive RFC3339 start time. Defaults to seven days before to. The window must be positive and at most 31 days.",
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Exclusive RFC3339 end time. Defaults to now. Reuse the returned from/to values while paging.",
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Page size, default 20, maximum 100.",
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Opaque meta.next_cursor from the previous page; omit on the first page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "description": "Optional error or success filter based on retained spans in the trace's project scope.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "error",
                "success"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "cost": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "duration_ms": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "end_time": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "generation_count": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "has_error": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "project_uuid": {
                            "format": "uuid",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "start_time": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "uuid": {
                            "format": "uuid",
                            "type": "string"
                          }
                        },
                        "required": [
                          "uuid",
                          "project_uuid",
                          "name",
                          "status",
                          "start_time",
                          "end_time",
                          "duration_ms",
                          "generation_count",
                          "has_error",
                          "cost"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "properties": {
                        "currency": {
                          "const": "USD",
                          "type": "string"
                        },
                        "from": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "limit": {
                          "maximum": 100,
                          "minimum": 1,
                          "type": "integer"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "project_uuid": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "retained_only": {
                          "const": true,
                          "type": "boolean"
                        },
                        "to": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "total_count": {
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "total_count",
                        "from",
                        "to",
                        "currency",
                        "limit",
                        "next_cursor",
                        "retained_only"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "meta",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "List retained trace summaries",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/user/v1/usage": {
      "get": {
        "description": "Read usage in projects you can access in the connected organization, including calls without retained traces. Omit project_uuid to include unassigned organization usage. For limited project access, only metrics with recorded organization scope qualify as unassigned usage. All arguments are optional; start with {} for a seven-day summary. Use group_by=model or project to find the most expensive groups, ranked by total_cost descending (stable group-key tie break), up to limit; grouping requires bucket=none. Project groups use public project UUIDs and names when metadata is available. With no grouping, bucket=day returns up to 32 daily buckets over a maximum 31-day window. Costs are USD: cost covers customer model calls, evals_cost covers evaluations, guards_cost covers guards/routing checks, and total_cost includes all three. Counts/tokens/errors describe customer calls, matching the app's usage analytics. This is recorded inference/controls usage, not an invoice or balance; credits, storage and other billing adjustments are not represented. If meta.has_more, increase limit up to 100 or narrow the project/date filter. Requires runtime:read.",
        "operationId": "userGetUsage",
        "parameters": [
          {
            "description": "Optional project UUID you can access. Omit to include eligible projects and attributable unassigned organization usage.",
            "in": "query",
            "name": "project_uuid",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Inclusive RFC3339 start time. Defaults to seven days before to. The window must be positive and at most 31 days.",
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Exclusive RFC3339 end time. Defaults to now. Reuse the returned from/to values while paging.",
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "none (default) for a summary or grouped ranking; day for a compact UTC daily series without grouping.",
            "in": "query",
            "name": "bucket",
            "schema": {
              "enum": [
                "none",
                "day"
              ],
              "type": "string"
            }
          },
          {
            "description": "none (default), model, or project. Grouped rankings require bucket=none.",
            "in": "query",
            "name": "group_by",
            "schema": {
              "enum": [
                "none",
                "model",
                "project"
              ],
              "type": "string"
            }
          },
          {
            "description": "Maximum groups in a ranking, default 20, maximum 100. Does not truncate ungrouped summaries or daily series.",
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "bucket": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "cache_creation_tokens": {
                            "type": "integer"
                          },
                          "cache_read_tokens": {
                            "type": "integer"
                          },
                          "cache_savings": {
                            "type": "number"
                          },
                          "completion_tokens": {
                            "type": "integer"
                          },
                          "cost": {
                            "type": "number"
                          },
                          "count": {
                            "type": "integer"
                          },
                          "duration_ms_sum": {
                            "type": "integer"
                          },
                          "errors_other": {
                            "type": "integer"
                          },
                          "errors_policy": {
                            "type": "integer"
                          },
                          "errors_provider": {
                            "type": "integer"
                          },
                          "errors_rate_limited": {
                            "type": "integer"
                          },
                          "evals_cost": {
                            "type": "number"
                          },
                          "group": {
                            "description": "Recorded model identifier or project UUID according to meta.group_by. Omitted for ungrouped or unidentified historical groups.",
                            "type": "string"
                          },
                          "guards_cost": {
                            "type": "number"
                          },
                          "last_called_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "project_name": {
                            "type": "string"
                          },
                          "project_uuid": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "prompt_tokens": {
                            "type": "integer"
                          },
                          "total_cost": {
                            "type": "number"
                          },
                          "total_tokens": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "count",
                          "errors_rate_limited",
                          "errors_provider",
                          "errors_other",
                          "errors_policy",
                          "prompt_tokens",
                          "completion_tokens",
                          "total_tokens",
                          "cache_read_tokens",
                          "cache_creation_tokens",
                          "duration_ms_sum",
                          "cost",
                          "evals_cost",
                          "guards_cost",
                          "total_cost",
                          "cache_savings"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "additionalProperties": false,
                      "properties": {
                        "bucket": {
                          "enum": [
                            "none",
                            "day"
                          ],
                          "type": "string"
                        },
                        "currency": {
                          "const": "USD",
                          "type": "string"
                        },
                        "from": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "group_by": {
                          "enum": [
                            "none",
                            "model",
                            "project"
                          ],
                          "type": "string"
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "limit": {
                          "maximum": 100,
                          "minimum": 1,
                          "type": "integer"
                        },
                        "project_uuid": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "retention_independent": {
                          "const": true,
                          "type": "boolean"
                        },
                        "to": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "total_count": {
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "total_count",
                        "from",
                        "to",
                        "currency",
                        "bucket",
                        "group_by",
                        "has_more",
                        "retention_independent"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "meta",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "MCPBearer": []
          }
        ],
        "summary": "Read usage and inference costs",
        "tags": [
          "User delegation"
        ]
      }
    },
    "/v3/artifacts/{id}": {
      "delete": {
        "description": "Delete a finished async job's result, status and any staged input now, instead of waiting for its pickup window to end (24 hours, 1 hour on a zero-retention project). Call it once you have saved the result. A job that is still running is refused with 409. A `file_id` copy stored with `store: true` is not affected; delete it with DELETE /v3/files/{id}.",
        "operationId": "deleteArtifact",
        "parameters": [
          {
            "description": "Artifact generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete an artifact generation result",
        "tags": [
          "Artifacts"
        ]
      }
    },
    "/v3/artifacts/{id}/status": {
      "get": {
        "description": "Poll for async artifact generation status. Returns a presigned download URL, valid for 1 hour (until `expires_at`), when the generation is complete. When the job named a `callback_url`, a finished job also reports its webhook delivery under `webhook`. When the job was submitted with `store: true`, the completed response also carries a `file_id`, the persisted /v3/files entry you can reuse as a typed input on later generations. The result is a delivery, not storage: it is deleted 24 hours after the job finishes (1 hour on a zero-retention project), or earlier with DELETE /v3/artifacts/{id}, and the status then answers 404. A 503 means the status could not be read just now: poll again. A `file_id` copy is kept until you delete it.",
        "operationId": "getArtifactStatus",
        "parameters": [
          {
            "description": "Artifact generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "description": "When the job was submitted (only while processing).",
                      "type": "string"
                    },
                    "deadline_at": {
                      "description": "When a video job gives up (only while processing). A job still running then fails with `error_type` `timeout`, unbilled, and its webhook is sent. The deadline covers the provider's queue as well as the render, and depends on the provider (1 hour by default, 2 hours on providers that queue jobs when busy).",
                      "format": "date-time",
                      "type": "string"
                    },
                    "error": {
                      "description": "Error message (only when failed)",
                      "type": "string"
                    },
                    "error_type": {
                      "description": "Failure category (only when failed): `invalid_request` (the provider refused the request; `error` says why), `content_policy`, `rate_limited` (retry later), `provider_unavailable` (the provider could not serve the job; retry or use another model), `provider_error` (the provider failed the render), `timeout` (the job reached `deadline_at` before the provider finished it; it was cancelled at the provider where the provider allows it, and is not billed), `internal_error`, `interrupted`, or a Model access lock refusal.",
                      "type": "string"
                    },
                    "expires_at": {
                      "description": "When `url` stops working (1 hour after it was made).",
                      "format": "date-time",
                      "type": "string"
                    },
                    "file_id": {
                      "description": "Persisted /v3/files id for the output (only when completed and the job set store=true)",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "processing",
                        "completed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "store_skipped": {
                      "description": "Why a requested store did not happen (e.g. skipped-quota-exceeded); empty when stored or when store was not requested",
                      "type": "string"
                    },
                    "url": {
                      "description": "Presigned download URL (only when completed), valid until `expires_at`.",
                      "type": "string"
                    },
                    "usage": {
                      "description": "What the generation was billed (only when completed).",
                      "properties": {
                        "cost": {
                          "description": "USD charged",
                          "type": "number"
                        },
                        "images": {
                          "type": "integer"
                        },
                        "seconds": {
                          "description": "Video seconds billed",
                          "type": "number"
                        },
                        "size": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "webhook": {
                      "description": "Delivery of the job's completion webhook; present when the job named a `callback_url` and has ended.",
                      "properties": {
                        "attempts": {
                          "type": "integer"
                        },
                        "event": {
                          "type": "string"
                        },
                        "last_attempt_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "last_error": {
                          "type": "string"
                        },
                        "last_status_code": {
                          "description": "What your endpoint answered last; absent after a network error.",
                          "type": "integer"
                        },
                        "next_attempt_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "pending",
                            "delivered",
                            "failed"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get artifact generation status",
        "tags": [
          "Artifacts"
        ]
      }
    },
    "/v3/assets": {
      "get": {
        "description": "The project's assets, newest first, optionally of one subject.",
        "operationId": "listAssets",
        "parameters": [
          {
            "description": "Only this subject's assets",
            "in": "query",
            "name": "subject_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Max items (default 20, max 100)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "description": "Items to skip (default 0)",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List assets",
        "tags": [
          "Assets"
        ]
      }
    },
    "/v3/assets/{id}": {
      "delete": {
        "description": "Delete an asset here and at the provider. Videos already made are not affected.",
        "operationId": "deleteAsset",
        "parameters": [
          {
            "description": "Asset ID (asset_...)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete an asset",
        "tags": [
          "Assets"
        ]
      },
      "get": {
        "description": "An asset's status.",
        "operationId": "getAsset",
        "parameters": [
          {
            "description": "Asset ID (asset_...)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get an asset",
        "tags": [
          "Assets"
        ]
      }
    },
    "/v3/audio/generations": {
      "post": {
        "description": "Generate audio from a text prompt with any audio generation model from `GET /v3/audio/models`: music (`type=music`) or sound effects and ambience (`type=sound`). By default runs synchronously and returns it inline as base64 (200). Set `async: true` to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. `model` is required, and `prompt` too unless `sections` are sent; `duration_seconds`, `instrumental`, `format` (omit it for the model's native format) and `seed` are normalized, and a value a model cannot honor answers 400 naming the limit. `sections` (a timed plan: each section's `duration_ms`, `prompt` and `styles`) needs a model with the `audio_sections` capability, and `loop` one with `audio_loop`; a model without the capability answers 400 rather than ignoring the field. Everything in `parameters` is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set `store: true` to also save the output to /v3/files and get a reusable `file_id`; nothing is stored otherwise.",
        "operationId": "createAudioGeneration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudioGenerationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioGenerationResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioGenerationJobResponse"
                }
              }
            },
            "description": "Accepted: async generation submitted (async: true). Poll the returned `status_url` (GET /v3/artifacts/{id}/status) for a presigned download URL when complete."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Generate audio",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/audio/models": {
      "get": {
        "description": "List the models usable with the `/v3/audio` endpoints: a `type=tts,stt,music,sound` view of the model catalog. Same shape and query params as `/v3/models` (search, `include`, pagination), but always scoped to audio models. Narrow to one family with `type=tts` (POST /v3/audio/speech), `type=stt` (POST /v3/audio/transcriptions), `type=music` (POST /v3/audio/music) or `type=sound` (POST /v3/audio/generations). `params.tts` lists each speech model's `voices`, `default_voice`, and `max_length`; `params.stt` lists each transcription model's `languages`, `formats`, whether it supports `diarize`, and the provider settings it takes under `parameters` (`params.stt.parameters`, each with a description). Paginated: 50 rows per page by default. While the response's `has_more` is true, request again with `offset` set to `next_offset`. Narrow the list with the filters (for example `q`, `type`, `capability` or `provider`) instead of reading every page.",
        "operationId": "listAudioModels",
        "parameters": [
          {
            "description": "Narrow the audio family to `tts`, `stt`, `music` or `sound`. Default: all of them.",
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "tts",
                "stt",
                "music",
                "sound"
              ],
              "type": "string"
            }
          },
          {
            "description": "Comma-separated list of optional fields to attach to each item. Supported: `maker` (public), `route` (requires API key), `benchmarks` (public), `policy` (requires API key — per-item comply allowlist verdict), `editorial` (public: the model's `short_description` and `long_description`).",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "maker",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of a model's id, name, description or alias. Dots, dashes, underscores, colons, slashes and spaces are also ignored on both sides from the start of a word, so `gpt-5-1`, `gpt 5.1` and `gpt5.1` all find `gpt-5.1`.",
            "in": "query",
            "name": "q",
            "schema": {
              "example": "claude-sonnet",
              "type": "string"
            }
          },
          {
            "description": "Filter by provider name (e.g. `openai`, `xai`).",
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Set to `true` to include retired models in results.",
            "in": "query",
            "name": "deprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Field to sort by (`id`, `name`, `provider`, `cost`, `speed`, `quality`). Default `id`.",
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "id",
              "type": "string"
            }
          },
          {
            "description": "`asc` (default) or `desc`.",
            "in": "query",
            "name": "order",
            "schema": {
              "default": "asc",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Page size. A non-positive value returns all rows from offset.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List audio models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/audio/music": {
      "post": {
        "description": "Generate a song or instrumental track from a text prompt. By default runs synchronously and returns it inline as base64 (200). Set `async: true` to run it on the background worker and get a 202 with a status URL to poll instead; use it for full-length tracks, which can take minutes. `model` and `prompt` are required; `duration_seconds`, `instrumental`, `format` (mp3 default) and `seed` are normalized, and everything in `parameters` is forwarded verbatim to the provider (for ElevenLabs, `parameters.composition_plan` replaces `prompt`). `sections` and `loop` work as on POST /v3/audio/generations, which this route is the music-only alias of. Lyrics are returned when the provider produces them. Set `store: true` to also save the output to /v3/files and get a reusable `file_id`; nothing is stored otherwise.",
        "operationId": "createMusic",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MusicRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MusicResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MusicJobResponse"
                }
              }
            },
            "description": "Accepted: async generation submitted (async: true). Poll the returned `status_url` (GET /v3/artifacts/{id}/status) for a presigned download URL when complete."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Generate music",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/audio/songs": {
      "get": {
        "description": "List this project's live, unexpired songs. Provider identifiers are never returned.",
        "operationId": "listAudioSongs",
        "parameters": [
          {
            "description": "Maximum songs to return (default 20, maximum 100)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of songs to skip (default 0)",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SongListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List stored songs",
        "tags": [
          "Audio"
        ]
      },
      "post": {
        "description": "Upload a project-owned file, public HTTPS URL or audio data URI to a model with audio_upload. Returns an opaque song id and optionally a composition plan. Charged by uploaded duration. Requires a nonzero project retention period. ElevenLabs has no public song deletion API; its upstream retention is unspecified.",
        "operationId": "createAudioSong",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSongRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSongEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Upload a song for editing",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/audio/songs/{id}": {
      "delete": {
        "description": "Revokes the Opper song reference and removes its saved composition plan. ElevenLabs has no public song deletion API, so provider_deleted is false and upstream retention remains unspecified.",
        "operationId": "deleteAudioSong",
        "parameters": [
          {
            "description": "Project-owned song ID (song_...)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteSongEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete a stored song reference",
        "tags": [
          "Audio"
        ]
      },
      "get": {
        "description": "Returns 404 for a missing, expired, deleted or foreign-project song.",
        "operationId": "getAudioSong",
        "parameters": [
          {
            "description": "Project-owned song ID (song_...)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SongEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a stored song",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/audio/speech": {
      "post": {
        "description": "Convert text to spoken audio synchronously and get it back inline as base64. `model` and `input` are required; `voice`, `format` (mp3 default; `response_format` is accepted as an alias, and a `response_format` that is not an audio format, such as `b64_json`, is ignored), and `speed` are normalized and validated against the model's declared capabilities, and everything in `parameters` is forwarded verbatim to the provider. Set `store: true` to also save the output to /v3/files and get a reusable `file_id`; nothing is stored otherwise. Send `Accept: application/octet-stream` (or an `audio/*` type, without `application/json`) to get the audio bytes as the response body instead, typed by `Content-Type`, as the OpenAI SDKs expect; `POST /v3/compat/audio/speech` always answers that way.",
        "operationId": "createSpeech",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpeechResponse"
                }
              },
              "audio/aac": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/flac": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/ogg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/pcm": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/wav": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Generation-Cost": {
                "description": "Execution cost in USD.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Generation-Id": {
                "description": "Opper generation ID (`spch_…`). Set when the body is the audio bytes.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Opper-Cost": {
                "description": "Execution cost in USD, matching X-Generation-Cost. Set when the body is the audio bytes.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Opper-File-Id": {
                "description": "The stored file's id when `store: true`. Set when the body is the audio bytes.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Generate speech (TTS)",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/audio/transcriptions": {
      "post": {
        "description": "Transcribe audio to text. By default runs synchronously and returns the transcript inline (200); `audio` accepts a `file_\u003cid\u003e`, an https URL, or a base64 data-URI (max 25MB decoded). A `file_\u003cid\u003e` or https URL that is an MP4 video may be up to 100MB: past 25MB its audio track alone is sent to the model, copied out without re-encoding, and that track has to fit the 25MB limit (a video with no audio track, or one whose track cannot be read, is a 400 that says so). Billing is by the audio's length either way. Set `stream: true` to receive the transcript live as Server-Sent Events (`transcript.text.delta` chunks then a final `transcript.text.done`, terminated by `data: [DONE]`) — supported on streaming models like `mistral/voxtral-mini-2602`, a 400 otherwise. Set `async: true` to run on the background worker and get a 202 with a status URL to poll instead — use it for long recordings that can exceed the synchronous timeout; it accepts the same `audio` sources (an inline data-URI is staged in Opper's storage in eu-north-1 and deleted when the worker starts the job) and lifts the decoded-audio cap to 100MB. A `file_\u003cid\u003e` or https URL reaches the full 100MB; a data-URI is also bound by the 100 MiB request body limit, which with base64 overhead allows about 75MB of decoded audio. The result is deleted 24 hours after the job finishes, 1 hour on a zero-retention project, or earlier with DELETE /v3/artifacts/{id} (then the status URL answers 404); each status poll returns a fresh download link valid for 1 hour. `stream` and `async` are mutually exclusive. `model` and `audio` are required; `language` and `prompt` are passed through as hints; `diarize` requests speaker labels (400 on models without diarization support); everything in `parameters` is forwarded verbatim to the provider, and the keys each model takes are listed with descriptions under `params.stt.parameters` in GET /v3/models.",
        "operationId": "createTranscription",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptionResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptionJobResponse"
                }
              }
            },
            "description": "Accepted – async transcription submitted (async: true). Poll the returned `status_url` (GET /v3/artifacts/{id}/status) for a presigned URL to the transcript JSON when complete."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Transcribe audio (STT)",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/audio/voices": {
      "get": {
        "description": "Without `model`: the project's custom cloned voices, newest first. With `model` (a text-to-speech model id): every voice that model takes as `voice` on /v3/audio/speech, which is the provider's preset voices (`type: preset`) followed by the project's clones on that provider (`type: custom`). Presets are the provider's own list (`meta.presets_source: provider`, refreshed every few hours where it is read from the provider), or the model's declared voices when it declares them (`meta.presets_source: catalog`). A voice carries what its maker publishes about it: `name`, `gender`, `languages`, `accent`, `use_case` and `description`, each only where known. `language` and `gender` filter; `q` is a word search over those fields that puts the best matches first. Only voices every account on the provider can use are listed as presets; no other customer's voices are ever shown. Paginated with the shared `meta`+`data` shape.",
        "operationId": "listVoices",
        "parameters": [
          {
            "description": "Text-to-speech model id, e.g. elevenlabs/eleven_v3. Lists that model's preset voices plus the project's clones on its provider.",
            "in": "query",
            "name": "model",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With model: preset or custom",
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "preset",
                "custom"
              ],
              "type": "string"
            }
          },
          {
            "description": "With model: language code, e.g. de or en-GB. Matches by prefix, so en matches en-US.",
            "in": "query",
            "name": "language",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With model: gender, as the provider labels it (e.g. female, male)",
            "in": "query",
            "name": "gender",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With model: words to find voices by, e.g. `warm british narrator`. Looked for in each voice's id, name, gender, accent, use_case, description and languages (by code and by English name, so `spanish` finds `es-MX`). A word matches the start of a word, so `narrat` finds narrator and `male` does not find female; `woman` and `man` count as female and male. Voices matching none of the words are left out; those matching more of them come first. Up to 200 characters.",
            "in": "query",
            "name": "q",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Max items (default 20, max 100; with model: default 100, max 1000)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "description": "Items to skip (default 0)",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/VoiceObject"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "model": {
                          "description": "With model: the resolved model id",
                          "type": "string"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "presets_source": {
                          "description": "With model: where the preset voices came from",
                          "enum": [
                            "provider",
                            "catalog"
                          ],
                          "type": "string"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List voices",
        "tags": [
          "Audio"
        ]
      },
      "post": {
        "description": "Clone a custom voice from a short reference sample (a few seconds of speech). `model` selects the provider to clone on (e.g. `mistral/voxtral-mini-tts-2603`) — the returned voice works with any of that provider's TTS models; `audio` is the reference sample as a `file_\u003cid\u003e`, an https URL, or a base64 data-URI; `languages` and `gender` are optional hints. Returns an opaque `id` (`voice_…`) to pass as `voice` on POST /v3/audio/speech. The voice is scoped to your project — it is not visible to or usable by other projects — and the reference audio is not stored. Paid feature.",
        "operationId": "createVoice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceObject"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Create a custom voice (clone)",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/audio/voices/{id}": {
      "delete": {
        "description": "Delete one of the project's custom voices. Removes it upstream at the provider too; the reference sample was never stored.",
        "operationId": "deleteVoice",
        "parameters": [
          {
            "description": "Voice id (voice_…)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "example": "voice",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete a custom voice",
        "tags": [
          "Audio"
        ]
      },
      "get": {
        "description": "Get one of the project's custom voices by id.",
        "operationId": "getVoice",
        "parameters": [
          {
            "description": "Voice id (voice_…)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceObject"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a custom voice",
        "tags": [
          "Audio"
        ]
      }
    },
    "/v3/batches": {
      "get": {
        "description": "The project's batches, newest first. Page with `after` set to the previous page's `last_id`.",
        "operationId": "listBatches",
        "parameters": [
          {
            "description": "Max items (default 20, max 100)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "description": "The last_id of the previous page",
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchList"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List batches",
        "tags": [
          "Batches"
        ]
      },
      "post": {
        "description": "Submit many requests to run on a provider's batch API at its batch price (about half the synchronous price), finished within 24 hours, usually much sooner. The shape is OpenRouter's: `endpoint` (`/v1/chat/completions`, `/v1/responses`, `/v1/messages`, `/v1/embeddings` or `/v1beta/generateContent`), one `model`, and `requests`, each a unique `custom_id` (1 to 64 letters, digits, `-` or `_`) and a `body` in the endpoint's format without `model` and `stream`. Bodies pass through to the provider as written, so a batch runs only where the provider speaks its endpoint: OpenAI models take chat completions, responses and embeddings, Claude models take messages, Gemini models take generateContent (Google's native request: `contents`, `systemInstruction`, `tools`, `generationConfig`). One pairing is translated: a `/v1/chat/completions` batch also runs on Vertex AI batch endpoints (Gemini, and Claude in the EU), whose batch API takes only the model's own format. Opper translates each line when the batch is created, the way a synchronous chat completions call to the same model is translated (system messages, `response_format` with a JSON schema, function `tools` and `tool_choice`, `max_completion_tokens`, `reasoning_effort`, inline images), and returns each successful result as a `chat.completion` body. On such a batch a line is refused with 400 for `n` above 1, `models`, `custom_model_credentials`, a tool that is not a function tool, and media given by URL (send it inline as a `data:` URI); fields the synchronous endpoint leaves out (`logprobs`, `store` and the like) are left out here too, and refused under `provider.require_parameters`. `provider.only` narrows the batch endpoints; `GET /v3/models?service_tier=batch` lists them. Up to 50,000 requests and 100 MiB. A batch is billed when it ends, so it is accepted only when its worst case (each request at its `max_tokens`, or the model's maximum output where it sets none), with the worst cases of the organization's batches still running, fits in its balance and budgets: otherwise 402 with `estimated_cost_usd` and `available_usd` (set `max_tokens`, top up, or split the batch). A request without an output cap counts as the model's whole maximum output, so set one on every request: 10,000 Gemini 3.5 Flash Lite requests without `maxOutputTokens` count as 65,536 output tokens each, about $900 at the EU batch price, where `maxOutputTokens: 500` makes it about $7 plus input. On a translated chat completions line a missing cap becomes the model's default output cap, as on a synchronous call (128,000 tokens on Claude 5.5), and counts in full. The check is not a charge: the bill is what the lines produced. Free-plan organizations get 402 `plan_required`. Tools the provider runs and charges per use (web search and fetch, file search, code execution, image generation, remote MCP, and Gemini's Google Search, URL context, Maps and code execution tools) are refused with 400; function and client tools work. So is any reference to state stored at the provider (`previous_response_id`, `conversation`, a stored `prompt`, `container`, `store: true`, a `file_id` or file source in the input, a Gemini `cachedContent` or a `gs://` or Files API `fileUri`, and on Vertex AI batch endpoints any Cloud Storage URL): send content inline or as a public https URL. Answers 202 with the batch; poll GET /v3/batches/{id}. A batch cannot be cancelled once submitted. Batch endpoints keep request content at the provider for the provider's batch retention (see each endpoint's data handling), and Opper keeps the results for the project's retention period after the batch ends, at most 30 days (24 hours on a zero-retention project), or until DELETE.",
        "operationId": "createBatch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchObject"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Create a batch",
        "tags": [
          "Batches"
        ]
      }
    },
    "/v3/batches/{id}": {
      "delete": {
        "description": "Delete a finished batch and its results now, instead of waiting for its results window to end. A batch that has not finished answers 409.",
        "operationId": "deleteBatch",
        "parameters": [
          {
            "description": "Batch ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete a batch",
        "tags": [
          "Batches"
        ]
      },
      "get": {
        "description": "The batch's status, request counts, usage and cost. Once it is `completed`, `expired` or `cancelled`, `results` carries every request's outcome inline (not in input order; match on `custom_id`): a `response` with the provider's `status_code` and `body`, or an `error`. The `body` is the provider's own, in the batch's `endpoint` format; on a `/v1/chat/completions` batch that ran on a Vertex AI batch endpoint it is a `chat.completion` object Opper rendered from the provider's answer (`choices[0].message` with `content`, `tool_calls` and `reasoning_content`, `finish_reason` with the provider's own word in `native_finish_reason`, `usage` and `cost`, `model` as the batch named it). A request that succeeded also carries `usage`: its tokens and the USD `cost` it was billed, which sum to the batch's `usage`. For a large batch read GET /v3/batches/{id}/results instead.",
        "operationId": "getBatch",
        "parameters": [
          {
            "description": "Batch ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchObject"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a batch",
        "tags": [
          "Batches"
        ]
      }
    },
    "/v3/batches/{id}/results": {
      "get": {
        "description": "A finished batch's results, a page at a time, each line as in GET /v3/batches/{id}, with `usage.cost` on every request that succeeded. Pass `next_cursor` as `cursor` for the next page. Answers 409 while the batch runs and 410 once its results window has passed.",
        "operationId": "getBatchResults",
        "parameters": [
          {
            "description": "Batch ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Index of the first result to return (default 0)",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Max results (default 1000, max 10000)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 1000,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResultsPage"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a batch's results",
        "tags": [
          "Batches"
        ]
      }
    },
    "/v3/compat/audio/speech": {
      "post": {
        "description": "OpenAI-compatible text-to-speech: the drop-in URL the OpenAI SDKs call for `audio.speech.create` when their base URL is `/v3/compat`. Takes the same body as `POST /v3/audio/speech` (`model`, `input`, `voice`, `response_format` or `format`, `speed`, plus Opper's `parameters` passthrough) and returns the audio bytes as the response body, typed by `Content-Type` (for example `audio/mpeg` for mp3, `audio/wav` for wav). A format the model cannot produce answers 400 naming the formats it accepts. Errors are JSON.",
        "operationId": "createSpeechOpenAICompat",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "audio/aac": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/flac": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/ogg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/pcm": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "audio/wav": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Generation-Cost": {
                "description": "Execution cost in USD.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Generation-Id": {
                "description": "Opper generation ID (`spch_…`). Set when the body is the audio bytes.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Opper-Cost": {
                "description": "Execution cost in USD, matching X-Generation-Cost. Set when the body is the audio bytes.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Opper-File-Id": {
                "description": "The stored file's id when `store: true`. Set when the body is the audio bytes.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Speech API (OpenAI-compatible)",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/audio/transcriptions": {
      "post": {
        "description": "Transcribe an uploaded audio file (up to 25 MB). Send `file` and `model` as multipart form fields, or use the JSON `input_audio` shape. The default response is a JSON object with `text`. Select a model from the STT catalog, for example `openai/whisper-1`. Output formats, timestamps, diarization and streaming depend on the selected model.",
        "operationId": "createTranscriptionOpenAICompat",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenAITranscriptionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "chunking_strategy": {
                    "description": "An automatic or JSON-configured chunking strategy, when supported by the model.",
                    "type": "string"
                  },
                  "file": {
                    "format": "binary",
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "model": {
                    "example": "openai/whisper-1",
                    "type": "string"
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "response_format": {
                    "enum": [
                      "json",
                      "text",
                      "verbose_json",
                      "srt",
                      "vtt",
                      "diarized_json"
                    ],
                    "type": "string"
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "temperature": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  },
                  "timestamp_granularities[]": {
                    "items": {
                      "enum": [
                        "word",
                        "segment"
                      ],
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "file",
                  "model"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "type": "object"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream. Each event is a JSON object prefixed with 'data: '.",
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/vtt": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "413": {
            "description": "Audio or request body exceeds the upload limit"
          },
          "415": {
            "description": "Unsupported request content type"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Transcription API (OpenAI-compatible)",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/chat/completions": {
      "post": {
        "description": "OpenAI-compatible chat completions endpoint. Supports streaming via the stream parameter.",
        "operationId": "chatCompletions",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream. Each event is `data: \u003cjson\u003e` (a `chat.completion.chunk` object). The stream terminates with `data: [DONE]`. When `stream_options.include_usage` is true, the final chunk before `[DONE]` carries `usage` and an Opper `cost` extension.",
                  "type": "string"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "description": "Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
                          "properties": {
                            "allowed_models_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "callable_models": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "docs_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "list_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "lock_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why the call was refused. Known values are listed; new ones may be added.",
                              "examples": [
                                "model_access_lock_blocked",
                                "model_allowlist_blocked",
                                "model_list_blocked",
                                "tool_access_lock_blocked",
                                "tool_allowlist_blocked"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in the OpenAI error shape. The status and the error's code or type are the same for every refusal; `error.details.reason` says which it was."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Chat Completions API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/cloudflare/clairic": {
      "post": {
        "description": "Cloudflare Clairic-compatible extraction. Clairic is Cloudflare's extraction model: it reads a `state` (text, and up to four inline `images`) and answers each of your typed `fields` (`text`, `number`, `date`, `time`, `datetime`, `duration`, `list`, `estimate`, `forecast`) with a typed value, in one pass and without generating tokens. The body is Cloudflare's own and reaches Workers AI unchanged but for `model`: `clairic` is the model's pool (its pooled endpoints), and an endpoint id such as `cloudflare:global/clairic` pins that endpoint. The answer is Clairic's as Cloudflare sends it: per field a `value` that is null when the input does not determine it, `p_null` and `confidence` on scalars, character offsets on text spans, and a median with an 80% interval (`p10` to `p90`) on estimates and forecasts; `options.include_quantiles` adds all 99 percentiles. Clairic is a preview. Billed on `usage.input_tokens`, with no output charge. Uses a project-scoped Opper API key, Comply policies and provider entitlements. Cost and generation ID are returned in headers. Streaming is unsupported.",
        "operationId": "createClairicExtraction",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClairicRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClairicResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Generation-Cost": {
                "description": "Execution cost in USD, matching X-Opper-Cost.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Generation-Id": {
                "description": "Opper generation ID for this evaluation.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Opper-Trace-Id": {
                "description": "Trace UUID for this evaluation.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "413": {
            "description": "The body exceeds 16 MiB, Workers AI's limit for Clairic"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Cloudflare Clairic extraction API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/decisions": {
      "post": {
        "description": "OpenAI Decisions-compatible synchronous evaluation. Send `model`, `input` (a string, or user messages with `input_text` and inline base64 `input_image` parts) and typed `questions` (`predicate`, `choice`, `score`, and the Opper extension `locate`); `answers` come back in question order with probabilities and confidence; a question the model declines comes back as a `refusal` answer. A `locate` question, for models with the `locate` capability (Perplexity Decider v1.3, others return 422), takes a string `input` and `instructions` saying what to find, and answers with `spans`: each match's `start` and `end` (Unicode code point offsets into `input`, `end` exclusive), its `text` and a `score`, or an empty list. A full catalog ID, e.g. `openai/gpt-6-luna-decisions`, `typesafe/jev-latest` or `greenpt/metis`, pins that endpoint; a bare model name, e.g. `gpt-6-luna-decisions` or `clef`, routes over that model's pooled endpoints as a chat model name does (list available endpoints with `GET /v3/models?type=evaluation`). OpenAI's Decisions model is called natively and answers with OpenAI's body unchanged. Other decision models are reached by translation to System One and accept text input only, except `empiriolabs/aplomb-1`, which takes the images too. GreenPT Metis receives all 1–32 questions together in one upstream request. Translation preserves question order, probabilities and confidence, but joins text-message boundaries and does not expose native impact, score legends or additional answer metadata; use the System One endpoint for the native contract. Billed on input tokens. Uses a project-scoped Opper API key, Comply policies and provider entitlements. Cost and generation ID are returned in headers. Streaming is unsupported.",
        "operationId": "createDecision",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Generation-Cost": {
                "description": "Execution cost in USD, matching X-Opper-Cost.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Generation-Id": {
                "description": "Opper generation ID for this evaluation.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Opper-Trace-Id": {
                "description": "Trace UUID for this evaluation.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Decisions API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/embeddings": {
      "post": {
        "description": "OpenAI-compatible embeddings endpoint. `model` is an endpoint id, which pins that endpoint, or a bare model name (e.g. `text-embedding-3-small`), which routes over the model's pooled endpoints and falls over to the next one when an endpoint fails, such as on a provider's rate limit. `X-Opper-Name` names the call for the project's rules, guardrails and trace.",
        "operationId": "createEmbeddings",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingsResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "description": "Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
                          "properties": {
                            "allowed_models_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "callable_models": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "docs_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "list_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "lock_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why the call was refused. Known values are listed; new ones may be added.",
                              "examples": [
                                "model_access_lock_blocked",
                                "model_allowlist_blocked",
                                "model_list_blocked",
                                "tool_access_lock_blocked",
                                "tool_allowlist_blocked"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in the OpenAI error shape. The status and the error's code or type are the same for every refusal; `error.details.reason` says which it was."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Embeddings API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/models": {
      "get": {
        "description": "OpenAI Models API compatible endpoint. Returns everything the caller can put in `model` — in OpenAI's models.list shape — so tools that point an OpenAI-compatible base URL at `/v3/compat` (gateways, n8n, LangChain, etc.) can discover the live catalogue without hardcoding model IDs.\n\nHuman labels are optional `opper.display_name` metadata; `id` remains the callable identifier. Dynamic routes additionally carry `opper.pricing.kind=variable`, never a fixed numeric price. Every entry carries `opper.kind`, which names what it is:\n\n- `model` — a concrete catalog row (LLM or embedding), e.g. `anthropic/claude-sonnet-4.5`. Pinning this id pins that provider.\n- `pool` — a bare model name that load-balances across providers, e.g. `claude-sonnet-4.5`. `opper.members` lists the catalog rows it routes over. Listed only for names that genuinely fan out (two or more routable members).\n- `dynamic_route` — one of the calling org's deployed routing graphs, addressed as `dynamic/\u003cname\u003e`. `opper.version` is the deployed version a call would execute. Org-scoped to the API key; draft-only routes are not listed. No numeric pricing is reported — the graph picks the model per request — but `context_length` and `opper.max_output_tokens` ARE, as the smallest any reachable candidate offers: a floor is a guarantee rather than a guess, and clients that must size a context before calling would otherwise have to invent one. Omitted when any candidate cannot be resolved here (e.g. an org-scoped BYOK model).\n\nNarrow with `?type=` (comma-separated, e.g. `?type=pool,dynamic_route`); omitting it returns all three kinds, with concrete models first (their long-standing order is unchanged), then pools, then routes.\n\nEntries additionally carry OpenRouter-shaped `pricing` (USD per token) and `context_length`, plus an `opper` block holding the entry's `type` (`llm` or `embedding` — this list carries both, and `capabilities` cannot tell them apart), the model's `capabilities` (`text`, `tools`, `vision`, `pdf`, `structured_output`, … — the same vocabulary as `/v3/models`), its `max_output_tokens`, selectable effort controls under `opper.reasoning` (`supported` and optional `default`), and a compliance summary (`region`, `country`, `zdr`, `gdpr_residency`, `verification`) so a client can declare what a model can do and filter on residency/ZDR criteria in one call; `zdr` is the tri-state retention facts object (`logging`, `moderation`, `caching`, `training`, `subprocessors`; `null` = not established), not a summary word — derive what you need from it; full data-handling detail lives on `/v3/models?include=route`. A pool reports a capability or compliance property only when EVERY member has it, takes the smallest `context_length` / `max_output_tokens` across members, and prices at the worst case. Pool effort controls are the intersection of all allowed members' declared ladders; `supported: []` means no portable selectable effort, even if members think internally. The default is present only if all members agree on a supported value. Concrete rows without declared effort controls and dynamic routes omit `opper.reasoning`. `none` is an explicit off-switch only when listed; omitting an effort leaves provider defaults in control. These fields do not change routing. This means a capability check, a residency filter or a pre-call cost estimate can never be flattered by one lucky member. Dynamic routes report only capabilities shared by every resolvable allowed candidate; an unresolved candidate leaves capabilities unknown. Their standard numeric `pricing` remains omitted because the graph picks the model per request. The whole listing is scoped to the caller's comply allowlist: denied models, denied pool members, pools with no permitted member, and routes whose every model node is denied are all absent. Featured models first, then ID-ascending; no pagination, matching OpenAI. Callable without a key: a request that sends none gets the public catalog (the `all` view, no dynamic routes). A key that is sent is checked as on every other route, so an unknown or expired key is still 401.",
        "operationId": "listOpenAICompatModels",
        "parameters": [
          {
            "description": "Comma-separated entry kinds to return: `model`, `pool`, `dynamic_route`. Omit for all three.",
            "in": "query",
            "name": "type",
            "schema": {
              "example": "pool,dynamic_route",
              "type": "string"
            }
          },
          {
            "description": "Set to `codex` for the native authenticated Codex remote catalog (`models`, with tool-capable LLMs and routes only). Absent or empty returns the unchanged OpenAI models.list shape (`data`). Other values return 400. Native catalogs apply the same caller policy and entitlement checks and fail with 503 if route discovery is unavailable. Responses exceeding Codex's 1 MiB limit return 400; use a narrower type filter.",
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "codex",
                ""
              ],
              "type": "string"
            }
          },
          {
            "description": "For `format=codex`, retain this exact authorized tool-capable model even outside the type filter and place it first. Unknown, denied, empty and unsupported selections uniformly return 400. Does not change authorization or inference routing.",
            "in": "query",
            "name": "selected_model",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Codex appends its version to native catalog requests. Accepted for compatibility; does not change the catalog.",
            "in": "query",
            "name": "client_version",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which entries to list. `all` lists every catalog row, pool and dynamic route. `simplified` lists each model once: its pool's bare name when it routes across providers, otherwise its one pooled catalog row; service-tier and extra-region rows are left out. `recommended` narrows `simplified` to a short list of current models Opper recommends (the catalog's featured models), plus the organization's dynamic routes. Omit to use the organization's setting (Model list for API keys, in the platform's API key settings), which is `all` unless changed. The view changes only what is listed: every id stays callable, and Comply rules apply in every view. Other values return 400. With `format=codex` a `selected_model` is still retained when the view leaves it out.",
            "in": "query",
            "name": "view",
            "schema": {
              "enum": [
                "all",
                "simplified",
                "recommended"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/OpenAICompatModelsListResponse"
                    },
                    {
                      "$ref": "#/components/schemas/CodexModelCatalog"
                    }
                  ]
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Native Codex model discovery is temporarily unavailable. The server does not substitute a partial catalog when route discovery fails."
          }
        },
        "security": [
          {},
          {
            "BearerAuth": []
          }
        ],
        "summary": "List models (OpenAI-compatible)",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/openresponses": {
      "post": {
        "description": "OpenResponses-compatible endpoint with multi-provider support and opper: extension items.",
        "operationId": "createOpenResponse",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ORRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ORResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream. Each event has an `event:` line and a `data: \u003cjson\u003e` line; the payload's `type` field discriminates the event. The stream terminates with a `response.completed` event whose payload carries the final `usage` (token counts and `cost`).",
                  "discriminator": {
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ORStreamEventResponseCreated"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventResponseInProgress"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventOutputItemAdded"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventContentPartAdded"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventOutputTextDelta"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventOutputTextDone"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventContentPartDone"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventReasoningSummaryDelta"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventReasoningSummaryDone"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventFunctionCallArgumentsDelta"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventFunctionCallArgumentsDone"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventOutputItemDone"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventCompleted"
                    },
                    {
                      "$ref": "#/components/schemas/ORStreamEventError"
                    }
                  ]
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "description": "Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
                          "properties": {
                            "allowed_models_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "callable_models": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "docs_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "list_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "lock_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why the call was refused. Known values are listed; new ones may be added.",
                              "examples": [
                                "model_access_lock_blocked",
                                "model_allowlist_blocked",
                                "model_list_blocked",
                                "tool_access_lock_blocked",
                                "tool_allowlist_blocked"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in the OpenAI error shape. The status and the error's code or type are the same for every refusal; `error.details.reason` says which it was."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "OpenResponses API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/realtime": {
      "get": {
        "description": "OpenAI GA Realtime WebSocket for server-side clients. Upgrade the connection with an Opper inference key in `Authorization: Bearer …` and select an OpenAI-backed conversational Realtime model using `?model=`. The server emits `session.created` and accepts `session.update`, audio buffer, conversation item, and response events in the OpenAI format. Opper's model access rules, session limits, and billing apply.",
        "operationId": "realtimeOpenAICompat",
        "parameters": [
          {
            "description": "OpenAI Realtime model ID, for example openai/gpt-realtime-2.1-mini.",
            "in": "query",
            "name": "model",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "101": {
            "description": "Switching Protocols – WebSocket connection established"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Realtime WebSocket (OpenAI-compatible)",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/responses": {
      "post": {
        "description": "OpenAI Responses API compatible endpoint. Supports streaming via the stream parameter. With `background: true` and `background_options.completion_window` (`2h` or `8h`) the call answers at once with a `queued` response that completes within the window at a discounted price: read it with GET /v3/compat/responses/{id}.",
        "operationId": "createResponse",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream following the OpenAI Responses streaming protocol. Each event has an `event:` line and a `data: \u003cjson\u003e` line. The stream terminates with a `response.completed` event whose payload carries the final `usage` (token counts and Opper `cost` extension).",
                  "type": "string"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "description": "Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
                          "properties": {
                            "allowed_models_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "callable_models": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "docs_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "list_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "lock_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why the call was refused. Known values are listed; new ones may be added.",
                              "examples": [
                                "model_access_lock_blocked",
                                "model_allowlist_blocked",
                                "model_list_blocked",
                                "tool_access_lock_blocked",
                                "tool_allowlist_blocked"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in the OpenAI error shape. The status and the error's code or type are the same for every refusal; `error.details.reason` says which it was."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Responses API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/responses/{id}": {
      "delete": {
        "description": "Delete a background response now, at Opper and at the provider, instead of waiting for it to expire. A response that is still running is cancelled first; what the provider reports it used before that is still billed. The id answers 404 afterwards. A response whose create call has not returned yet, or that has not finished stopping, answers 409: send the request again.",
        "operationId": "deleteResponse",
        "parameters": [
          {
            "description": "Response ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete a background response",
        "tags": [
          "Compatibility"
        ]
      },
      "get": {
        "description": "A response created with `background: true`, in the OpenAI Responses shape. `status` is `queued` or `in_progress` while it runs, then `completed`, `incomplete`, `failed` or `cancelled`; a finished response carries its `output` and its `usage` with the Opper `cost` extension. A finished response is kept for 24 hours (1 hour on a project with zero retention) and answers 404 after that. Only responses created in the background can be read: a synchronous response is not stored.",
        "operationId": "getResponse",
        "parameters": [
          {
            "description": "Response ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a background response",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/responses/{id}/cancel": {
      "post": {
        "description": "Stop a background response that is `queued` or `in_progress`. Answers with the response, now `cancelled`. Cancelling a cancelled response answers with it again; a response that already completed, failed or ended incomplete answers 400.",
        "operationId": "cancelResponse",
        "parameters": [
          {
            "description": "Response ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Cancel a background response",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1/messages": {
      "post": {
        "description": "Anthropic Messages API compatible endpoint. Supports streaming via the stream parameter.",
        "operationId": "createMessage",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream following the Anthropic Messages streaming protocol. The stream terminates with a `message_stop` event; the `message_delta` event preceding it carries the final `usage` and Opper `cost` extension.",
                  "type": "string"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "details": {
                          "description": "Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
                          "properties": {
                            "allowed_models_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "callable_models": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "docs_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "list_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "lock_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why the call was refused. Known values are listed; new ones may be added.",
                              "examples": [
                                "model_access_lock_blocked",
                                "model_allowlist_blocked",
                                "model_list_blocked",
                                "tool_access_lock_blocked",
                                "tool_allowlist_blocked"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in the Anthropic error shape. The status and the error's code or type are the same for every refusal; `error.details.reason` says which it was."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Messages API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1/messages/count_tokens": {
      "post": {
        "description": "Anthropic Messages token-counting compatible endpoint. Returns the number of input tokens a Messages request would consume, without creating a message. Mirrors Anthropic's POST /v1/messages/count_tokens (same request body as the Messages endpoint, minus the required max_tokens).\n\nThe model resolves exactly as it does on the Messages endpoint, so every model a message accepts can be counted, and one a message would reject fails the same way (404 for an unknown model, 403 for one the allowlist or an entitlement denies). Claude models are counted exactly by their own backend, in the model's region. Every other model, and a dynamic route, gets Opper's estimate in the same shape: characters / 4 over the system prompt, messages and tool declarations, plus 1 (within about 20% on English prose), with a flat amount per image and 3,000 tokens per PDF page. The `X-Opper-Count-Source` response header says which.",
        "operationId": "countMessageTokens",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "input_tokens": {
                      "description": "The number of input tokens the request would consume.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "input_tokens"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Count-Source": {
                "description": "Where `input_tokens` came from: `provider` when the model's provider counted it exactly, `estimate` when it is Opper's estimate.",
                "schema": {
                  "enum": [
                    "provider",
                    "estimate"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Count Message tokens",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1/models": {
      "get": {
        "description": "Anthropic Models API compatible endpoint. Returns Opper LLM models in Anthropic's models.list shape so SDKs and tools (e.g. Claude Code's /model picker) can discover the live catalogue without hardcoding model IDs. Supports forward (after_id) and backward (before_id) cursor pagination on a deterministic featured-first, ID-ascending sort. The key is read from `Authorization: Bearer` or `x-api-key`, as on `/compat/v1/messages`. Callable without a key: a request that sends none gets the public catalog (the `all` view, no dynamic routes). A key that is sent is checked as on every other route, so an unknown or expired key is still 401.",
        "operationId": "listAnthropicCompatModels",
        "parameters": [
          {
            "description": "Max models to return (1-1000, default 20).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Forward-paginate before this model ID; unknown IDs are ignored.",
            "in": "query",
            "name": "before_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Forward-paginate after this model ID; unknown IDs are ignored.",
            "in": "query",
            "name": "after_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which entries to list. `all` lists every catalog row, pool and dynamic route. `simplified` lists each model once: its pool's bare name when it routes across providers, otherwise its one pooled catalog row; service-tier and extra-region rows are left out. `recommended` narrows `simplified` to a short list of current models Opper recommends (the catalog's featured models), plus the organization's dynamic routes. Omit to use the organization's setting (Model list for API keys, in the platform's API key settings), which is `all` unless changed. The view changes only what is listed: every id stays callable, and Comply rules apply in every view. Other values return 400. Does not apply to the Claude Desktop profile.",
            "in": "query",
            "name": "view",
            "schema": {
              "enum": [
                "all",
                "simplified",
                "recommended"
              ],
              "type": "string"
            }
          },
          {
            "description": "Set to `claude-desktop` to discover only authorized tool-capable Claude IDs and pools supported by Claude Desktop. Dynamic routes are excluded. Omit for the unchanged Anthropic catalog. Unknown profiles return 400.",
            "in": "header",
            "name": "X-Opper-Model-Catalog",
            "schema": {
              "enum": [
                "claude-desktop"
              ],
              "type": "string"
            }
          },
          {
            "description": "For the Claude Desktop profile: `pools,routes` (default) lists Claude pools; `all` also lists provider models. The profile always excludes routes and unsupported IDs.",
            "in": "header",
            "name": "X-Opper-Catalog-Model-Kinds",
            "schema": {
              "enum": [
                "pools,routes",
                "all"
              ],
              "type": "string"
            }
          },
          {
            "description": "For the Claude Desktop profile: retain this exact authorized supported Claude model outside the kind filter and place it first. Unavailable or unsupported selections uniformly return 400.",
            "in": "header",
            "name": "X-Opper-Catalog-Selected-Model",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnthropicCompatModelsListResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Model-Catalog": {
                "description": "Capability marker `claude-desktop` on a successful Claude Desktop profile response. Older servers omit it; clients must verify it before removing an existing model list.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {},
          {
            "BearerAuth": []
          }
        ],
        "summary": "List models (Anthropic-compatible)",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1/systemone": {
      "post": {
        "description": "System One-compatible synchronous evaluation. Send `model`, `state` and named typed `questions` (`noul`, `choice`, `score`, and `locate` on models with the `locate` capability). A `locate` question takes `instructions` as a string saying what to find (for example `email address`) and a string `state`, and answers with `spans`: each match's `start` and `end` (Unicode code point offsets into `state`, `end` exclusive), its `text` and a `score`, or an empty list when nothing matched. Perplexity Decider v1.3 answers locate; other models return 422 for it. Gemini Decision 1 accepts `document_file_ids` for PDFs and `media_file_ids` for images, audio and video. Upload files to POST /v3/files in the same project using `purpose=ocr_input` for PDFs or `purpose=reference_media` for the other media. Both fields share a limit of 16 files and 32 MiB before encoding. For file-only input, send an empty string as `state`. TypeSafe models also take images and `box` questions (preview upstream; format and limits may change): send the `TypeSafe-Danger-Zone-Images: true` header, which is forwarded to TypeSafe, and list each image once in `assets`, keyed by a placeholder written where the image belongs in the state, instructions or criteria. An asset is base64 (`data_base64` with `format` `png`, `jpg` or `jpeg`) in a JSON body, or a file part in a `multipart/form-data` body whose first part, `request`, holds the JSON body and whose asset names the part in `part`. A `box` question takes `instructions` and no criteria, needs Jev 1.14 (`typesafe/jev-preview` or `typesafe/jev-1.14.0`), and answers with `box` edges `top`, `bottom`, `left` and `right` as fractions of the image and a `confidence`. Images or a box question without the header return 400; other models return 422 for them. Bodies over 50 MiB return 413; TypeSafe's own limits (a 32 MiB body, image size, dimensions, pixels) return its 400 or 413. A full catalog ID, for example `typesafe/jev-1.13.0`, `typesafe/jev-latest` or `greenpt/metis`, pins that endpoint. A bare model name, for example `clef`, routes over that model's pooled endpoints as a chat model name does: a rate-limited or unavailable endpoint is retried once and the call falls over to the next, under the project's Comply allowlist. List available endpoints with `GET /v3/models?type=evaluation`. GreenPT Metis jointly evaluates 1–32 questions in one request; state is required but may be null, and instructions may be omitted or null. Its nullable descriptions, probabilities, confidence, score legends and native `impact` metadata are preserved. EmpirioLabs Aplomb (`empiriolabs/aplomb-1`) takes 1–128 questions and images, audio and video as media nodes anywhere in `state`: an object with `type` `image`, `audio` or `video` and either a public `https://` `url` or base64 `data` with its `mime`. Other providers retain their own validation contracts. Returns native `model`, `answers` and token `usage`. Uses a project-scoped Opper API key, Comply policies and provider entitlements. Cost and generation ID are returned in headers. Streaming, chat generation and tool calling are unsupported.",
        "operationId": "evaluateSystemOne",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "TypeSafe's opt-in for images and box questions: `true`. Required when the request has `assets` or a `box` question, and forwarded to TypeSafe as sent.",
            "in": "header",
            "name": "TypeSafe-Danger-Zone-Images",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluationRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "additionalProperties": {
                  "format": "binary",
                  "type": "string"
                },
                "description": "TypeSafe's image upload: the first part, `request`, is the JSON body; every other part is one image file (`image/png`, `image/jpeg`, `image/jpg`, `application/octet-stream` or no content type), named by exactly one asset's `part`.",
                "properties": {
                  "request": {
                    "$ref": "#/components/schemas/EvaluationRequest"
                  }
                },
                "required": [
                  "request"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluationResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Generation-Cost": {
                "description": "Execution cost in USD, matching X-Opper-Cost.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Generation-Id": {
                "description": "Opper generation ID for this evaluation.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Opper-Trace-Id": {
                "description": "Trace UUID for this evaluation.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "413": {
            "description": "The body exceeds 50 MiB, TypeSafe's body, image or placeholder limits, or the Gemini evaluation file size limit"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "529": {
            "description": "TypeSafe is temporarily overloaded"
          }
        },
        "summary": "System One evaluation API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1beta/interactions": {
      "post": {
        "description": "Google Interactions API compatible endpoint. Supports streaming via the stream parameter.",
        "operationId": "createInteraction",
        "parameters": [
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionsResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream. Each event has an `event:` line and a `data: \u003cjson\u003e` line. The stream terminates with an `interaction.complete` event whose payload carries the final `usage` and Opper `cost` extension.",
                  "type": "string"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "description": "Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
                          "properties": {
                            "allowed_models_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "callable_models": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "docs_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "list_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "lock_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why the call was refused. Known values are listed; new ones may be added.",
                              "examples": [
                                "model_access_lock_blocked",
                                "model_allowlist_blocked",
                                "model_list_blocked",
                                "tool_access_lock_blocked",
                                "tool_allowlist_blocked"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in the Interactions error shape. The status and the error's code or type are the same for every refusal; `error.details.reason` says which it was."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Interactions API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1beta/models": {
      "get": {
        "description": "Google Models API compatible endpoint (`models.list`), for Google GenAI SDKs and apps that point a Gemini base URL at `/v3/compat`. Lists the chat entries of `/v3/compat/models` (catalog rows, pools and dynamic routes, under the caller's Comply rules, in the same order) in Google's shape. Each `name` is `models/` plus an id `:generateContent` takes. Embedding models are not listed. `supportedGenerationMethods` names the methods Opper serves (`generateContent`, `countTokens`; `streamGenerateContent` is served too), and `thinking` is set for models with the `reasoning` capability. The key is read from `Authorization: Bearer` or `x-goog-api-key`, as on `:generateContent`. Callable without a key: a request that sends none gets the public catalog (the `all` view, no dynamic routes). A key that is sent is checked as on every other route, so an unknown or expired key is still 401.",
        "operationId": "listGoogleCompatModels",
        "parameters": [
          {
            "description": "Models per page: 50 when unset or not positive, at most 1000.",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "maximum": 1000,
              "type": "integer"
            }
          },
          {
            "description": "The `nextPageToken` of the previous page. A token this list did not hand out returns 400.",
            "in": "query",
            "name": "pageToken",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which entries to list, as on `/v3/compat/models`: `all`, `simplified` or `recommended`. Omit to use the organization's setting. Other values return 400.",
            "in": "query",
            "name": "view",
            "schema": {
              "enum": [
                "all",
                "simplified",
                "recommended"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleCompatModelsListResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {},
          {
            "BearerAuth": []
          }
        ],
        "summary": "List models (Google-compatible)",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1beta/models/{model}": {
      "get": {
        "description": "Google Models API compatible endpoint (`models.get`). Returns one entry of `GET /compat/v1beta/models` by any id `:generateContent` takes, including one the organization's list view leaves out, or 404 `NOT_FOUND`. Served by the same route as `:generateContent`.",
        "operationId": "getGoogleCompatModel",
        "parameters": [
          {
            "description": "Model id: a catalog row (e.g. `gcp/gemini-2.5-flash`), a pool's bare name (e.g. `gemini-2.5-flash`) or a dynamic route (`dynamic/\u003cname\u003e`).",
            "in": "path",
            "name": "model",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleCompatModel"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a model (Google-compatible)",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1beta/models/{model}:countTokens": {
      "post": {
        "description": "Google-compatible countTokens endpoint for pre-flight context-window sizing. The request body matches `:generateContent`. NOTE: Opper has no in-process Gemini tokenizer and returns a chars/4 heuristic (±~20% on English prose) — sufficient for \"does my prompt fit?\" checks but not for exact cost projection.",
        "operationId": "countTokens",
        "parameters": [
          {
            "description": "Model id — a bare model name (e.g. `gemini-2.5-flash`), which routes over that model's pool (Gemini API and Vertex endpoints the project's allowlist permits) and falls over between them, or an Opper-canonical id (e.g. `vertexai/gemini-2.5-flash`), which pins that endpoint.",
            "in": "path",
            "name": "model",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountTokensResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Count Tokens API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1beta/models/{model}:generateContent": {
      "post": {
        "description": "Google Gemini-compatible generateContent endpoint — the drop-in surface for SDKs calling `models.generate_content()`. The request body is the Gemini `GenerateContentRequest` shape (camelCase `contents` / `systemInstruction` / `generationConfig`); the response is `candidates[].content.parts[]` + `usageMetadata`. The `{model}` path segment resolves as on the other compat endpoints: a bare model name (e.g. `gemini-2.5-flash`) routes over that model's pool, and an Opper-canonical id (e.g. `vertexai/gemini-2.5-flash`) pins that endpoint.",
        "operationId": "generateContent",
        "parameters": [
          {
            "description": "Model id — a bare model name (e.g. `gemini-2.5-flash`), which routes over that model's pool (Gemini API and Vertex endpoints the project's allowlist permits) and falls over between them, or an Opper-canonical id (e.g. `vertexai/gemini-2.5-flash`), which pins that endpoint.",
            "in": "path",
            "name": "model",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateContentResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "details": {
                          "items": {
                            "properties": {
                              "@type": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              },
                              "metadata": {
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "reason": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "message": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in Google's error shape (`status` `permission_error`). `error.details` holds one `google.rpc.ErrorInfo` whose `reason` is the refusal's reason in upper case (`MODEL_ACCESS_LOCK_BLOCKED`, `MODEL_ALLOWLIST_BLOCKED`, `MODEL_LIST_BLOCKED`, `TOOL_ACCESS_LOCK_BLOCKED`, `TOOL_ALLOWLIST_BLOCKED`; new values may be added) and whose `metadata` carries the links. Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Generate Content API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/compat/v1beta/models/{model}:streamGenerateContent": {
      "post": {
        "description": "Streaming variant of generateContent. Pass `?alt=sse` (as Google's SDKs do) to receive Server-Sent Events; each `data:` line is a partial `GenerateContentResponse`. The request body matches `:generateContent`.",
        "operationId": "streamGenerateContent",
        "parameters": [
          {
            "description": "Model id — a bare model name (e.g. `gemini-2.5-flash`), which routes over that model's pool (Gemini API and Vertex endpoints the project's allowlist permits) and falls over between them, or an Opper-canonical id (e.g. `vertexai/gemini-2.5-flash`), which pins that endpoint.",
            "in": "path",
            "name": "model",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Set to `sse` for Server-Sent Events framing (matches Google SDK behaviour).",
            "in": "query",
            "name": "alt",
            "schema": {
              "enum": [
                "sse"
              ],
              "type": "string"
            }
          },
          {
            "description": "Names the call. The model span takes this name, and so does the trace when that span is its root. Up to 256 bytes.",
            "in": "header",
            "name": "X-Opper-Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Parent span ID for distributed tracing context.",
            "in": "header",
            "name": "X-Opper-Parent-Span-Id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated `key:value` usage-attribution tags (e.g. `tenant:acme,project:demo`, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=\u003ckey\u003e. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); `opper.`-prefixed keys and `session_id` are reserved. Malformed values return 400.",
            "in": "header",
            "name": "X-Opper-Tags",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateContentResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream (`?alt=sse`). Each event is a `data: \u003cjson\u003e` line carrying a partial `GenerateContentResponse` (incremental `candidates[].content.parts[]`); no `event:` line. The final chunk carries `finishReason` and `usageMetadata` (token counts + Opper `cost` extension under `usageMetadata.opper`).",
                  "type": "string"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "details": {
                          "items": {
                            "properties": {
                              "@type": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              },
                              "metadata": {
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "reason": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "message": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in Google's error shape (`status` `permission_error`). `error.details` holds one `google.rpc.ErrorInfo` whose `reason` is the refusal's reason in upper case (`MODEL_ACCESS_LOCK_BLOCKED`, `MODEL_ALLOWLIST_BLOCKED`, `MODEL_LIST_BLOCKED`, `TOOL_ACCESS_LOCK_BLOCKED`, `TOOL_ALLOWLIST_BLOCKED`; new values may be added) and whose `metadata` carries the links. Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Stream Generate Content API",
        "tags": [
          "Compatibility"
        ]
      }
    },
    "/v3/files": {
      "get": {
        "description": "List files for the project, newest first. Paginated with the shared `meta`+`data` shape. Optionally filter by `type`, `purpose`, or a `q` substring search.",
        "operationId": "listFiles",
        "parameters": [
          {
            "description": "Max items (default 20, max 100)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "description": "Items to skip (default 0)",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer"
            }
          },
          {
            "description": "Filter by media family",
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "image",
                "video",
                "audio"
              ],
              "type": "string"
            }
          },
          {
            "description": "Filter by exact purpose (e.g. reference_media, generated_image)",
            "in": "query",
            "name": "purpose",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring match on filename or id",
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "bytes": {
                            "type": "integer"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "expires_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "filename": {
                            "type": "string"
                          },
                          "id": {
                            "description": "file_… id",
                            "type": "string"
                          },
                          "mime_type": {
                            "type": "string"
                          },
                          "object": {
                            "example": "file",
                            "type": "string"
                          },
                          "purpose": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List files",
        "tags": [
          "Files"
        ]
      },
      "post": {
        "description": "Upload a file (multipart/form-data) and get back a `file_\u003cid\u003e`. The id can be passed as the `image`/`video`/`reference_images` source on POST /v3/videos. `purpose` defaults to `reference_media` (accepts common image, audio and video formats). Use `ocr_input` for PDFs. Gemini Decision 1 accepts same-project uploads in System One through `document_file_ids` and `media_file_ids`. The MIME type is detected from the bytes; size and per-org quota are enforced. Files are permanent until deleted; pass `ttl_seconds` to schedule an expiry.",
        "operationId": "uploadFile",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "description": "The file bytes.",
                    "format": "binary",
                    "type": "string"
                  },
                  "filename": {
                    "description": "Optional advisory filename (defaults to the upload's filename).",
                    "type": "string"
                  },
                  "purpose": {
                    "default": "reference_media",
                    "description": "Intended use; gates the accepted MIME types.",
                    "type": "string"
                  },
                  "ttl_seconds": {
                    "description": "Optional lifetime in seconds; omit for a permanent file. Can be changed later via PATCH /v3/files/{id}.",
                    "type": "integer"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "bytes": {
                      "type": "integer"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "id": {
                      "description": "file_… id",
                      "type": "string"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "object": {
                      "example": "file",
                      "type": "string"
                    },
                    "purpose": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "413": {
            "description": "File size or storage quota exceeded. A `storage_quota_exceeded` response includes organization totals only when the key can read storage usage."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Upload a file",
        "tags": [
          "Files"
        ]
      }
    },
    "/v3/files/usage": {
      "get": {
        "description": "Report the organization's current file-storage usage and quota for bytes and file count. Uploads and stored generated media share this quota. Project service keys can read these totals. Personal keys require organization-wide quota visibility. A limit of `0` means that dimension is unbounded, in which case `remaining` is omitted.",
        "operationId": "getFilesUsage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "bytes_limit": {
                      "description": "Per-org byte quota (0 = unbounded).",
                      "type": "integer"
                    },
                    "bytes_remaining": {
                      "description": "bytes_limit - bytes_used, clamped at 0 (omitted when unbounded).",
                      "type": "integer"
                    },
                    "bytes_used": {
                      "description": "Total bytes stored across the org's live files.",
                      "type": "integer"
                    },
                    "file_count": {
                      "description": "Number of the org's live files.",
                      "type": "integer"
                    },
                    "file_count_limit": {
                      "description": "Per-org file-count quota (0 = unbounded).",
                      "type": "integer"
                    },
                    "file_count_remaining": {
                      "description": "file_count_limit - file_count, clamped at 0 (omitted when unbounded).",
                      "type": "integer"
                    },
                    "object": {
                      "example": "files.usage",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "description": "Organization-wide storage usage is unavailable to this key."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get storage usage",
        "tags": [
          "Files"
        ]
      }
    },
    "/v3/files/{id}": {
      "delete": {
        "description": "Delete a file (removes the stored bytes).",
        "operationId": "deleteFile",
        "parameters": [
          {
            "description": "File ID (file_…)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete a file",
        "tags": [
          "Files"
        ]
      },
      "get": {
        "description": "Get a file's metadata by id.",
        "operationId": "getFile",
        "parameters": [
          {
            "description": "File ID (file_…)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "bytes": {
                      "type": "integer"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "id": {
                      "description": "file_… id",
                      "type": "string"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "object": {
                      "example": "file",
                      "type": "string"
                    },
                    "purpose": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get file metadata",
        "tags": [
          "Files"
        ]
      },
      "patch": {
        "description": "Set or clear a file's expiry. `ttl_seconds` is the only mutable field: a positive integer schedules the file to expire that many seconds from now; an explicit `null` clears a previously set expiry (files are permanent by default).",
        "operationId": "updateFile",
        "parameters": [
          {
            "description": "File ID (file_…)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "bytes": {
                      "type": "integer"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "id": {
                      "description": "file_… id",
                      "type": "string"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "object": {
                      "example": "file",
                      "type": "string"
                    },
                    "purpose": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Update a file's expiry",
        "tags": [
          "Files"
        ]
      }
    },
    "/v3/files/{id}/content": {
      "get": {
        "description": "Returns a short-TTL presigned download URL for the file's bytes.",
        "operationId": "getFileContent",
        "parameters": [
          {
            "description": "File ID (file_…)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "bytes": {
                      "type": "integer"
                    },
                    "mime_type": {
                      "type": "string"
                    },
                    "url": {
                      "description": "Presigned download URL (valid ~1 hour)",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a file download URL",
        "tags": [
          "Files"
        ]
      }
    },
    "/v3/forecast": {
      "post": {
        "description": "Probabilistic forecasts of numeric time series from their history, zero-shot, with a time-series foundation model (Mistral's Timestral: `timestral-5m`, `timestral-28m`, `timestral-123m`, `timestral-209m`). `model`, `prediction_length` and `series` are required. Each series has a `target`: a list of numbers, or a list of equally long lists for several variates forecast jointly, with `null` for a missing value. Up to 32,768 steps of history are read (the most recent are kept). Optional per series: `past_covariates` (rows as long as the target), `known_covariates` (rows as long as the target plus `prediction_length`, such as holidays or prices you already know) and their categorical counterparts (category codes). `quantile_levels` picks from the 21 levels 0.01, 0.05, 0.1, ..., 0.9, 0.95, 0.99 (all by default). The answer mirrors each target's shape: per series a `median` and `quantiles` keyed by level, each `prediction_length` steps long, plus `usage`. A bare model name routes over that model's pooled endpoints; an endpoint id pins one. Billed per million time steps: `usage.input_steps` (every target variate and covariate row read) at the endpoint's input price and `usage.forecast_steps` at its output price. Uses a project-scoped Opper API key, Comply policies and provider entitlements. Cost and generation ID are returned in headers.",
        "operationId": "createForecast",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForecastRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Generation-Cost": {
                "description": "Execution cost in USD, matching X-Opper-Cost.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Generation-Id": {
                "description": "Opper generation ID for this evaluation.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Opper-Cost": {
                "description": "Execution cost of the request as a floating-point number.",
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              },
              "X-Opper-Trace-Id": {
                "description": "Trace UUID for this evaluation.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "413": {
            "description": "The body exceeds 64 MiB"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "description": "The forecasting service is busy; retry shortly"
          }
        },
        "summary": "Forecast time series",
        "tags": [
          "Forecasting"
        ]
      }
    },
    "/v3/generations": {
      "get": {
        "description": "List recorded HTTP request/response generations with pagination.",
        "operationId": "listGenerations",
        "parameters": [
          {
            "description": "Page number (default 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page (default 50)",
            "in": "query",
            "name": "page_size",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "page_size": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "total_pages": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List generations",
        "tags": [
          "Generations"
        ]
      }
    },
    "/v3/generations/{id}": {
      "delete": {
        "description": "Delete a specific recorded generation.",
        "operationId": "deleteGeneration",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete generation",
        "tags": [
          "Generations"
        ]
      },
      "get": {
        "description": "Get a specific recorded generation by ID.",
        "operationId": "getGeneration",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Recorded generation with request and response data",
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get generation",
        "tags": [
          "Generations"
        ]
      }
    },
    "/v3/graphql": {
      "post": {
        "description": "Read-only GraphQL model discovery with field selection, filters and pagination. Public catalog fields need no key; route and policy fields require an inference key. Uses the standard GraphQL data/errors envelope. Pages contain at most 200 endpoints; requests are limited to 32 KiB, depth 20, 500 expanded selections and five model lists. Introspection is supported.",
        "operationId": "queryModels",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "operationName": {
                    "type": "string"
                  },
                  "query": {
                    "type": "string"
                  },
                  "variables": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "errors": {
                      "items": {
                        "additionalProperties": true,
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "Query the model catalog with GraphQL",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/images": {
      "post": {
        "description": "Generate one or more images. By default runs synchronously and returns them inline (200). Set `async: true` to run a single image on the background worker and get a 202 with a status URL to poll instead: use it for slow models (e.g. gpt-image high, imagen ultra) that can exceed the synchronous timeout. `model` and `prompt` are required; `n` (max 4; async is single-image), `size`/`aspect_ratio`, `quality`, and `style` are normalized, and everything in `parameters` is forwarded verbatim to the provider. `image`/`mask`/`reference_images` accept an http(s) URL, a data-URI, or a `file_\u003cid\u003e` for edit / image-to-image. `response_format` defaults to `b64_json`. Set `store: true` to also save the outputs to /v3/files and get a reusable `file_id`; nothing is stored otherwise. With `async: true`, set `callback_url` to get a signed webhook when the job ends instead of polling (see GET /v3/webhooks/secret).",
        "operationId": "createImage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageJobResponse"
                }
              }
            },
            "description": "Accepted – async generation submitted (async: true). Poll the returned `status_url` (GET /v3/artifacts/{id}/status) for a presigned download URL when complete."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Generate an image",
        "tags": [
          "Images"
        ]
      }
    },
    "/v3/images/models": {
      "get": {
        "description": "List the models usable with `POST /v3/images`, scoped to the `image_generation` capability. Unlike the video/audio model lists (which scope by `type`), this scopes by capability, because `/v3/images` routes on the `image_generation` capability: the result spans `type:image` models AND hybrid `type:llm` chat-image models (e.g. Nano Banana) that produce images natively. Same shape and query params as `/v3/models` (search, `include`, pagination). Each item is one provider's serving of a model, and its `id` is what `model` takes. `params.image` lists each model's accepted `sizes` (pixel-size models) or `aspect_ratios` (aspect-ratio models) and `qualities`; a model with `size_constraints` takes any `WxH` inside them, not only the listed sizes. `params.image.parameters` lists the provider settings `parameters` takes. `image_edit` in `capabilities` means it takes `image` / `mask` / `reference_images`. Paginated: 50 rows per page by default. While the response's `has_more` is true, request again with `offset` set to `next_offset`. Narrow the list with the filters (for example `q`, `type`, `capability` or `provider`) instead of reading every page.",
        "operationId": "listImageModels",
        "parameters": [
          {
            "description": "Comma-separated list of optional fields to attach to each item. Supported: `maker` (public), `route` (requires API key), `benchmarks` (public), `policy` (requires API key — per-item comply allowlist verdict), `editorial` (public: the model's `short_description` and `long_description`).",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "maker",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of a model's id, name, description or alias. Dots, dashes, underscores, colons, slashes and spaces are also ignored on both sides from the start of a word, so `gpt-5-1`, `gpt 5.1` and `gpt5.1` all find `gpt-5.1`.",
            "in": "query",
            "name": "q",
            "schema": {
              "example": "claude-sonnet",
              "type": "string"
            }
          },
          {
            "description": "Filter by provider (company) slug as published in each item's `provider.slug` (e.g. `openai`, `google`, `xai`, `pruna`).",
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Additional capability filter (repeatable) to narrow within image models; `image_generation` is always applied. Items matching ALL listed capabilities are returned.",
            "in": "query",
            "name": "capability",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Set to `true` to include retired models in results.",
            "in": "query",
            "name": "deprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Field to sort by (`id`, `name`, `provider`, `cost`, `speed`, `quality`). Default `id`.",
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "id",
              "type": "string"
            }
          },
          {
            "description": "`asc` (default) or `desc`.",
            "in": "query",
            "name": "order",
            "schema": {
              "default": "asc",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Page size. A non-positive value returns all rows from offset.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List image models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/me": {
      "get": {
        "description": "Identity and billing snapshot for the calling API key: organization and project names, the key's own project spend and budget this billing period, for a personal key its owner's own spend and allowance (`member_spend`), and whether spending is currently blocked (`balance_exhausted`, `project_spend_cap_hit`, `member_spend_cap_hit` when a personal key's owner reached their own or their role's cap, or `org_spend_cap_hit`). The organization-wide balance, spend and budget appear only when the key's owner holds the `billing:read` permission (owners and admins, or a custom role granted it); `visibility.organization_finance` says whether they were included. Answers even while spending is blocked, so a blocked key can learn why. Useful as a pre-flight \"can I still spend?\" check before starting expensive work.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "balance": {
                      "description": "Remaining prepaid credits (organization-wide). Present only when `visibility.organization_finance` is true.",
                      "properties": {
                        "balance_cents": {
                          "description": "Remaining balance in USD cents. May be briefly negative when usage overshoots the last top-up.",
                          "type": "integer"
                        },
                        "balance_dollars": {
                          "description": "The same balance in USD.",
                          "type": "number"
                        },
                        "currency": {
                          "enum": [
                            "usd"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "block_reason": {
                      "description": "Why spending is blocked; present only when `blocked` is true.",
                      "enum": [
                        "balance_exhausted",
                        "project_spend_cap_hit",
                        "member_spend_cap_hit",
                        "org_spend_cap_hit"
                      ],
                      "type": "string"
                    },
                    "blocked": {
                      "description": "True when new spend is currently rejected.",
                      "type": "boolean"
                    },
                    "member_spend": {
                      "description": "The personal key's owner: their spend on personal keys in the current billing period, and the cap that applies to them. `limit_scope` is `member` when a cap names them, which takes precedence, or `role` when it comes from their role; a role cap applies to each member holding the role, not to the role as a whole. Present only for personal keys, since project keys never count against a member's cap.",
                      "properties": {
                        "budget_period": {
                          "description": "How often the budget resets; present only with a budget. Spend, period_start and period_end then describe the budget's current window; a total budget has no period_end.",
                          "enum": [
                            "day",
                            "week",
                            "month",
                            "total"
                          ],
                          "type": "string"
                        },
                        "currency": {
                          "enum": [
                            "usd"
                          ],
                          "type": "string"
                        },
                        "limit_cents": {
                          "description": "The budget for this scope in USD cents. Null means no budget targets this scope, not unlimited spending: the organization's funding and budget still apply, and `blocked` reports them.",
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "limit_scope": {
                          "description": "Which budget the limit comes from; null when there is none.",
                          "enum": [
                            "member",
                            "role",
                            null
                          ],
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "period_end": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "period_start": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "remaining_cents": {
                          "description": "Budget left, never below zero; null when there is no budget.",
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "spent_cents": {
                          "type": "integer"
                        },
                        "spent_dollars": {
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "object": {
                      "example": "me",
                      "type": "string"
                    },
                    "organization": {
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "plan": {
                          "description": "Billing plan (e.g. free, gateway, control_plane, enterprise).",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "project": {
                      "properties": {
                        "name": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "project_spend": {
                      "description": "The key's own project: its spend in the current billing period, and its budget if one targets this project directly. An organization budget is never reported here. Present whenever billing is configured.",
                      "properties": {
                        "budget_period": {
                          "description": "How often the budget resets; present only with a budget. Spend, period_start and period_end then describe the budget's current window; a total budget has no period_end.",
                          "enum": [
                            "day",
                            "week",
                            "month",
                            "total"
                          ],
                          "type": "string"
                        },
                        "currency": {
                          "enum": [
                            "usd"
                          ],
                          "type": "string"
                        },
                        "limit_cents": {
                          "description": "The budget for this scope in USD cents. Null means no budget targets this scope, not unlimited spending: the organization's funding and budget still apply, and `blocked` reports them.",
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "limit_scope": {
                          "description": "Which budget the limit comes from; null when there is none.",
                          "enum": [
                            "project",
                            null
                          ],
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "period_end": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "period_start": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "remaining_cents": {
                          "description": "Budget left, never below zero; null when there is no budget.",
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "spent_cents": {
                          "type": "integer"
                        },
                        "spent_dollars": {
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "spend": {
                      "description": "Organization-wide usage spend in the current billing period, and the organization budget if one is set. Present only when `visibility.organization_finance` is true.",
                      "properties": {
                        "budget_period": {
                          "description": "How often the budget resets; present only with a budget. Spend, period_start and period_end then describe the budget's current window; a total budget has no period_end.",
                          "enum": [
                            "day",
                            "week",
                            "month",
                            "total"
                          ],
                          "type": "string"
                        },
                        "currency": {
                          "enum": [
                            "usd"
                          ],
                          "type": "string"
                        },
                        "limit_cents": {
                          "description": "The budget for this scope in USD cents. Null means no budget targets this scope, not unlimited spending: the organization's funding and budget still apply, and `blocked` reports them.",
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "limit_scope": {
                          "description": "Which budget the limit comes from; null when there is none.",
                          "enum": [
                            "organization",
                            null
                          ],
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "period_end": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "period_start": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "remaining_cents": {
                          "description": "Budget left, never below zero; null when there is no budget.",
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "spent_cents": {
                          "type": "integer"
                        },
                        "spent_dollars": {
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "visibility": {
                      "description": "What this key may see. Omitted when billing is not configured.",
                      "properties": {
                        "organization_finance": {
                          "description": "True when the key's owner holds `billing:read`, so `balance` and `spend` are included. False means they were withheld, not that they are zero.",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get caller identity and credits",
        "tags": [
          "Account"
        ]
      }
    },
    "/v3/models": {
      "get": {
        "description": "Endpoint to retrieve model info. Optional `include` adds extra fields per item: `maker` (underlying-weights creator, e.g. `meta` for Llama), `route` (data-handling / legal block — requires an Opper API key), `benchmarks` (public scores from artificialanalysis.ai; absent for realtime, OCR, image-gen, and other specialty models), `policy` (requires an Opper API key — annotates each item with the caller's effective comply allowlist verdict: `{\"allowed\": bool, \"blocked_by\": \"entitlement\"|\"lock\"|\"org\"|\"project\"}`, where `lock` is a model on a service route outside the project's Model access lock; the list itself stays unfiltered). Comma-separated, e.g. `?include=maker,benchmarks`. `inference_location`, `storage_location`, `training`, `logging` and `moderation` filter the list the way a model access rule on the Rules page does, so the result is what a rule with the same settings would allow. Values within one parameter are alternatives; the parameters combine. For models that run in the EU use `?inference_location=EU`; for No training and No logging on the Rules page use `?training=no\u0026logging=none`, and add `\u0026moderation=none` for No provider moderation. Paginated: 50 rows per page by default. While the response's `has_more` is true, request again with `offset` set to `next_offset`. Narrow the list with the filters (for example `q`, `type`, `capability` or `provider`) instead of reading every page.",
        "operationId": "listModels",
        "parameters": [
          {
            "description": "Comma-separated list of optional fields to attach to each item. Supported: `maker` (public), `route` (requires API key), `benchmarks` (public), `policy` (requires API key — per-item comply allowlist verdict), `editorial` (public: the model's `short_description` and `long_description`), `performance` (public: what Opper measured serving this endpoint on its own traffic over the last day, median `ttft_ms` (rounded to 10 ms) and `tokens_per_second` (whole number); absent when the endpoint served too few calls to measure).",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "maker,benchmarks",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of a model's id, name, description or alias. Dots, dashes, underscores, colons, slashes and spaces are also ignored on both sides from the start of a word, so `gpt-5-1`, `gpt 5.1` and `gpt5.1` all find `gpt-5.1`.",
            "in": "query",
            "name": "q",
            "schema": {
              "example": "claude-sonnet",
              "type": "string"
            }
          },
          {
            "description": "Filter by provider (company) slug as published in each item's `provider.slug` and on `/v3/providers` (e.g. `openai`, `anthropic`, `google`). Adapter keys like `vertexai` are not companies and match nothing.",
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by model type (`llm`, `image`, `tts`, `stt`, `video`, `realtime`, `embedding`, `rerank`, `ocr`, `evaluation`, `extraction`, `forecast`, `music`, `sound`).",
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Keep the endpoints of one model, by the canonical key each item carries as `model` (e.g. `kimi-k3`), exact match.",
            "in": "query",
            "name": "model",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true keeps the short, hand-curated list of current models per type that Opper features.",
            "in": "query",
            "name": "featured",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Keep endpoints of these processing tiers, comma-separated: `flex`, `priority` (alias `fast`), `ultrafast`, `economy`, `batch` (served by POST /v3/batches only), `background_2h` / `background_8h` (a discounted Responses background run that completes within the window), or `default` for standard endpoints. Each tier endpoint carries its tier as `service_tier` and its own price; request one with the `service_tier` field or by its id. E.g. `?service_tier=flex` lists every model sold at flex, `?model=kimi-k3\u0026service_tier=priority` the priority endpoints of one model.",
            "in": "query",
            "name": "service_tier",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by capability (repeatable). Items matching ALL listed capabilities are returned.",
            "in": "query",
            "name": "capability",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models that take ALL of these inputs, comma-separated: `text`, `image`, `file`, `pdf`, `audio`, `video`. Each item lists what it takes as `input_modalities`; a model without recorded modalities matches no modality filter.",
            "in": "query",
            "name": "input_modalities",
            "schema": {
              "example": "image,audio",
              "type": "string"
            }
          },
          {
            "description": "Keep models that give back ANY of these outputs, comma-separated: `text`, `image`, `embeddings`, `audio`, `video`, `rerank`, `decisions`, `speech`, `transcription`, or `all` for no filter. Each item lists what it gives back as `output_modalities`.",
            "in": "query",
            "name": "output_modalities",
            "schema": {
              "example": "speech,transcription",
              "type": "string"
            }
          },
          {
            "description": "Keep models whose inference runs inside any of these locations. Matches like Inference location on the Rules page: `EU` includes a model running in Sweden, and a model with no recorded location only matches `GLOBAL`. Each item reports its location as `compliance.inference_location`. Values come from the catalog's location list: the ISO 3166-1 alpha-2 codes of the countries providers serve from, and the areas `EU`, `EEA` and `GLOBAL`. A country missing from the list has no model recorded in it. Repeatable, or comma-separated.",
            "in": "query",
            "name": "inference_location",
            "schema": {
              "items": {
                "enum": [
                  "AE",
                  "AR",
                  "AT",
                  "AU",
                  "BE",
                  "BG",
                  "BH",
                  "BR",
                  "CA",
                  "CH",
                  "CL",
                  "CN",
                  "CY",
                  "CZ",
                  "DE",
                  "DK",
                  "EE",
                  "EEA",
                  "EG",
                  "ES",
                  "EU",
                  "FI",
                  "FR",
                  "GB",
                  "GLOBAL",
                  "GR",
                  "HK",
                  "HR",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IN",
                  "IS",
                  "IT",
                  "JP",
                  "KE",
                  "KR",
                  "KW",
                  "LI",
                  "LT",
                  "LU",
                  "LV",
                  "MT",
                  "MX",
                  "MY",
                  "NG",
                  "NL",
                  "NO",
                  "NZ",
                  "PH",
                  "PL",
                  "PT",
                  "QA",
                  "RO",
                  "RS",
                  "SA",
                  "SE",
                  "SG",
                  "SI",
                  "SK",
                  "TH",
                  "TR",
                  "TW",
                  "UA",
                  "US",
                  "VN",
                  "ZA"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider stores retained content (logs, content retained for moderation) only inside these locations. Matches like Storage location on the Rules page, by the same containment as `inference_location`. A model whose provider keeps no content (no logs, nothing retained for moderation, no training on it by default) matches any location. Values come from the catalog's location list: the ISO 3166-1 alpha-2 codes of the countries providers serve from, and the areas `EU`, `EEA` and `GLOBAL`. A country missing from the list has no model recorded in it. Repeatable, or comma-separated.",
            "in": "query",
            "name": "storage_location",
            "schema": {
              "items": {
                "enum": [
                  "AE",
                  "AR",
                  "AT",
                  "AU",
                  "BE",
                  "BG",
                  "BH",
                  "BR",
                  "CA",
                  "CH",
                  "CL",
                  "CN",
                  "CY",
                  "CZ",
                  "DE",
                  "DK",
                  "EE",
                  "EEA",
                  "EG",
                  "ES",
                  "EU",
                  "FI",
                  "FR",
                  "GB",
                  "GLOBAL",
                  "GR",
                  "HK",
                  "HR",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IN",
                  "IS",
                  "IT",
                  "JP",
                  "KE",
                  "KR",
                  "KW",
                  "LI",
                  "LT",
                  "LU",
                  "LV",
                  "MT",
                  "MX",
                  "MY",
                  "NG",
                  "NL",
                  "NO",
                  "NZ",
                  "PH",
                  "PL",
                  "PT",
                  "QA",
                  "RO",
                  "RS",
                  "SA",
                  "SE",
                  "SG",
                  "SI",
                  "SK",
                  "TH",
                  "TR",
                  "TW",
                  "UA",
                  "US",
                  "VN",
                  "ZA"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider's training stance is one of `no`, `yes`. Repeatable, or comma-separated. A stance that has not been researched never matches. `training=no` is No training on the Rules page. Each item reports its stance as `compliance.training`.",
            "in": "query",
            "name": "training",
            "schema": {
              "items": {
                "enum": [
                  "no",
                  "yes"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider's logging stance is one of `none`, `abuse_monitoring`, `limited_debug`, `other`. Repeatable, or comma-separated. A stance that has not been researched never matches. `logging=none` is No logging on the Rules page. Each item reports its stance as `compliance.logging`.",
            "in": "query",
            "name": "logging",
            "schema": {
              "items": {
                "enum": [
                  "none",
                  "abuse_monitoring",
                  "limited_debug",
                  "other"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose provider's moderation stance is one of `none`, `optional`, `default_on`, `mandatory`. Repeatable, or comma-separated. A stance that has not been researched never matches. `moderation=none` is No provider moderation on the Rules page. Each item reports its stance as `compliance.moderation`.",
            "in": "query",
            "name": "moderation",
            "schema": {
              "items": {
                "enum": [
                  "none",
                  "optional",
                  "default_on",
                  "mandatory"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Keep models whose `context_window` is at least this many tokens, e.g. `200000`.",
            "in": "query",
            "name": "min_context_window",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Keep token-priced models whose base input price (`pricing.input[0]`, USD per million tokens) is at most this. Models not priced per token are left out.",
            "in": "query",
            "name": "max_input_price",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Keep token-priced models whose base output price (`pricing.output[0]`, USD per million tokens) is at most this. Models not priced per token are left out.",
            "in": "query",
            "name": "max_output_price",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Keep endpoints Opper measured at no fewer than this many output tokens per second on its own traffic (see `include=performance`). Unmeasured endpoints are left out.",
            "in": "query",
            "name": "min_tokens_per_second",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Keep endpoints whose measured median time to first token is at most this many milliseconds (see `include=performance`). Unmeasured endpoints are left out.",
            "in": "query",
            "name": "max_ttft_ms",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Set to `true` to include retired models in results.",
            "in": "query",
            "name": "deprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Field to sort by (`id`, `name`, `provider`, `type`, `cost`, `speed`, `quality`, `context_window`, `ttft`, `tokens_per_second`). Default `id`. `speed` and `quality` are editorial tiers; `ttft` and `tokens_per_second` are measured on Opper traffic, and unmeasured endpoints sort last in either order, so `?sort=tokens_per_second\u0026order=desc` lists the fastest first.",
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "id",
              "type": "string"
            }
          },
          {
            "description": "`asc` (default) or `desc`.",
            "in": "query",
            "name": "order",
            "schema": {
              "default": "asc",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Page size. A non-positive value returns all rows from offset.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Model-Catalog-Version": {
                "description": "Database catalog version of the immutable serving-registry snapshot used for this response. Consumers combining callable and unavailable model feeds should only combine matching versions.",
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "X-Opper-Model-Corrections-Version": {
                "description": "Version of the accepted provider corrections applied to the routes in this response, from the same serving-registry snapshot as the catalog version. It moves when a correction is accepted, which the catalog version does not. Zero when none are applied.",
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/models/unavailable": {
      "get": {
        "description": "List model-level catalog entries that are explicitly published but are not present in this server's live callable model registry. Catalog candidates are cached by version and checked against one immutable live-registry snapshot on every request. Rows contain only model-intrinsic metadata: no callable id, provider, service route, compliance or pricing is fabricated. The default `/v3/models` response remains the callable endpoint catalog; combine the feeds only when their `X-Opper-Model-Catalog-Version` headers match. Paginated: 50 rows per page by default. While the response's `has_more` is true, request again with `offset` set to `next_offset`. Narrow the list with the filters (for example `q`, `type`, `capability` or `provider`) instead of reading every page.",
        "operationId": "listUnavailableModels",
        "parameters": [
          {
            "description": "Case-insensitive substring of a model's model key, name or description. Dots, dashes, underscores, colons, slashes and spaces are also ignored on both sides from the start of a word, so `gpt-5-1`, `gpt 5.1` and `gpt5.1` all find `gpt-5.1`.",
            "in": "query",
            "name": "q",
            "schema": {
              "example": "claude-sonnet",
              "type": "string"
            }
          },
          {
            "description": "Filter by model type (`llm`, `image`, `tts`, `stt`, `video`, `realtime`, `embedding`, `rerank`, `ocr`, `evaluation`, `extraction`, `forecast`, `music`, `sound`).",
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by capability (repeatable). Items matching ALL listed capabilities are returned.",
            "in": "query",
            "name": "capability",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Page size. A non-positive value returns all rows from offset.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnavailableModelsResponse"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Model-Catalog-Version": {
                "description": "Database catalog version of the immutable serving-registry snapshot used for this response. Consumers combining callable and unavailable model feeds should only combine matching versions.",
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List unavailable models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/models/{id}": {
      "get": {
        "description": "One public catalog entry by the name a call would put in `model`, in the same item shape as `/v3/models`. Names that exist only for one organization (custom and BYOK models, `dynamic/\u003croute\u003e`) are not in the public catalog and return 404, as they are absent from the list. An endpoint id (`anthropic/claude-sonnet-4-5`) or alias returns that entry; a retired entry is returned too, with `retired_at` and `successor` set. A bare model name (`gpt-5.1`) names a model rather than one endpoint, so it answers 300 with the ids of the endpoints that serve it and the `/v3/models?model=\u003cname\u003e` filter that returns them in full. It is not a redirect, so a client never parses that list as this route's single item. Anything else is a 404 whose body suggests the closest ids and the searches to run on `/v3/models` and `/v3/models/unavailable`. HEAD is answered like GET, without a body. Ids are matched exactly: `anthropic/claude-sonnet-4.5` is a 404 suggesting `anthropic/claude-sonnet-4-5`, because a call naming the variant would fail.",
        "operationId": "getModel",
        "parameters": [
          {
            "description": "Endpoint id, alias or bare model name. Ids contain slashes (`deepinfra/deepseek-ai/DeepSeek-V3.2`); send them as they are, unescaped.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "anthropic/claude-sonnet-4-5",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated optional fields, as on `/v3/models`: `maker` (public), `route` (requires API key), `benchmarks` (public), `policy` (requires API key), `editorial` (public), `performance` (public).",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "benchmarks",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ModelListItem"
                    },
                    "meta": {
                      "description": "Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`.",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response",
            "headers": {
              "X-Opper-Model-Catalog-Version": {
                "description": "Database catalog version of the immutable serving-registry snapshot used for this response. Consumers combining callable and unavailable model feeds should only combine matching versions.",
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "300": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelChoicesResponse"
                }
              }
            },
            "description": "The id is a bare model name. The body lists the endpoints that serve it."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelNotFoundResponse"
                }
              }
            },
            "description": "No endpoint, alias or model by that name."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "Get a model",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/ocr": {
      "post": {
        "description": "Extract text from a document or image synchronously and get it back as per-page markdown. `model` and `document` are required; `document` is one of `{type:\"document_url\", document_url}`, `{type:\"image_url\", image_url}`, `{type:\"base64\", content, document_name}` (PDF or image), or `{type:\"file\", file_id}` for a `file_\u003cid\u003e` from POST /v3/files. `pages` selects 0-based page indices; `include_image_base64`/`image_limit`/`image_min_size` control embedded-image extraction; everything in `parameters` is forwarded verbatim to the provider (e.g. Docling's `ocr_engine`, `lang`, `table_mode`, `do_formula_enrichment`). Billed per page processed.",
        "operationId": "createOCR",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OCRRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OCRResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Extract text (OCR)",
        "tags": [
          "OCR"
        ]
      }
    },
    "/v3/ocr/models": {
      "get": {
        "description": "List the models usable with `POST /v3/ocr` — a `type=ocr` view of the model catalog. Same shape and query params as `/v3/models` (search, `include`, pagination). Each item's `price_per_page` describes the per-page cost. Paginated: 50 rows per page by default. While the response's `has_more` is true, request again with `offset` set to `next_offset`. Narrow the list with the filters (for example `q`, `type`, `capability` or `provider`) instead of reading every page.",
        "operationId": "listOCRModels",
        "parameters": [
          {
            "description": "Comma-separated list of optional fields to attach to each item. Supported: `maker` (public), `route` (requires API key), `benchmarks` (public), `policy` (requires API key — per-item comply allowlist verdict), `editorial` (public: the model's `short_description` and `long_description`).",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "maker",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of a model's id, name, description or alias. Dots, dashes, underscores, colons, slashes and spaces are also ignored on both sides from the start of a word, so `gpt-5-1`, `gpt 5.1` and `gpt5.1` all find `gpt-5.1`.",
            "in": "query",
            "name": "q",
            "schema": {
              "example": "claude-sonnet",
              "type": "string"
            }
          },
          {
            "description": "Filter by provider name (e.g. `mistral`, `docling`).",
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Set to `true` to include retired models in results.",
            "in": "query",
            "name": "deprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Field to sort by (`id`, `name`, `provider`, `cost`). Default `id`.",
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "id",
              "type": "string"
            }
          },
          {
            "description": "`asc` (default) or `desc`.",
            "in": "query",
            "name": "order",
            "schema": {
              "default": "asc",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Page size. A non-positive value returns all rows from offset.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List OCR models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/openapi.json": {
      "get": {
        "description": "Returns the OpenAPI specification in JSON format.",
        "operationId": "getOpenAPISpecJSON",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "OpenAPI specification",
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "OpenAPI spec (JSON)",
        "tags": [
          "System"
        ]
      }
    },
    "/v3/openapi.yaml": {
      "get": {
        "description": "Returns the OpenAPI specification in YAML format.",
        "operationId": "getOpenAPISpecYAML",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "OpenAPI specification in YAML format",
                  "type": "string"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "OpenAPI spec (YAML)",
        "tags": [
          "System"
        ]
      }
    },
    "/v3/providers": {
      "get": {
        "description": "The companies whose models Opper serves — the public provider directory behind opper.ai/models. A **provider** is the company; the places it runs, and the terms it runs them under, are its **service routes**, listed here as `service_routes` (objects carrying their `id`). `owner_country` is the ultimate parent's jurisdiction as an ISO 3166-1 alpha-2 code — AWS is `US` — and is **absent, not empty**, when we have not researched it: a missing key never matches a residency filter. `regions` is the set of coarse residency buckets the company's routes serve from (`EU`, `US`, `GLOBAL`, …). `model_count` is the number of distinct models it serves today, counted the way `/v3/models` counts them: one model served from three routes is one model, and a model retired in the past is not counted. A renamed provider keeps its old names in `previous_slugs` so an indexed URL can be redirected to `slug`, and a provider that stops serving is `status: retired` rather than deleted — fetch it with `?status=retired`.\n\nThe directory itself needs no key. `?include=routes` **does**: it inflates each `service_routes` entry with that route's full block — `region`, `country`, `inference_location`, `data_handling` (training, logging, moderation, caching), `zdr` (the tri-state retention facts object), `gdpr` (residency, DPA availability, transfer mechanism), `sources`, `last_verified_at` and `verification` — which is the same block `/v3/models?include=route` serves, from the same data, behind the same requirement. Without a valid API key it returns **401**, never a quietly reduced response.",
        "operationId": "listProviders",
        "parameters": [
          {
            "description": "Comma-separated statuses to include: `live`, `announced`, `retired`, or `all`. Defaults to `live,announced` — retired providers keep their rows and URLs but are not listed by default.",
            "in": "query",
            "name": "status",
            "schema": {
              "example": "all",
              "type": "string"
            }
          },
          {
            "description": "Set to `routes` to inflate every `service_routes` entry with that route's data-handling / legal block — the same block as `/v3/models?include=route`. **Requires an Opper API key** (`Authorization: Bearer`); without one the request is rejected with 401 rather than served the id-only shape. Unrecognised values are ignored.",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "routes",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ProviderInfo"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "total_count": {
                          "description": "Total items in the collection.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List providers",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/realtime": {
      "get": {
        "description": "Model-driven realtime WebSocket endpoint. Open a WS connection, send a `session.start` event with `config.model` set to an Opper realtime model id (e.g. `openai/gpt-realtime-2`); the server resolves the provider from the model registry and connects upstream. Requires a project-scoped inference key (server-side) OR an ephemeral ticket minted via `POST /v3/realtime-sessions` (browser-side, passed as `?ticket=\u003cvalue\u003e` or `Sec-WebSocket-Protocol: opper-ticket.\u003cvalue\u003e`). Sessions are bounded by per-project concurrency, max duration, and idle timeout caps; billing flushes every 30 seconds with synchronous balance enforcement. The same protocol runs live speech-to-text on transcription models (`type=realtime` models whose `output_modalities` is `transcription`): audio in, `transcript.partial` and `transcript.committed` out. Each realtime model's `params.realtime` in GET /v3/models lists what its session config takes: `parameters` (provider settings for `config.parameters`, each with a description), `languages`, `input_audio_formats`, and whether it supports `diarize` and `turn_detection` `semantic_vad`. The event protocol is documented at https://docs.opper.ai/build/realtime/protocol.",
        "operationId": "realtimeAdhocWebSocket",
        "responses": {
          "101": {
            "description": "Switching Protocols – WebSocket connection established"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Realtime WebSocket (ad-hoc)",
        "tags": [
          "Realtime"
        ]
      }
    },
    "/v3/realtime-sessions": {
      "post": {
        "description": "Server-to-server endpoint that mints a short-lived, single-use ticket the browser uses to open a `/v3/realtime` WebSocket. Browsers cannot set an `Authorization` header on a WebSocket constructor, so the customer's backend authenticates with its normal API key here and returns the ticket to the browser. Fields in `config` are bound to the ticket and cannot be overridden by the browser at session.start — pre-bind `model` at minimum so a leaked ticket can't be redirected to a more expensive model. To lock a field to its zero value (e.g. force `output_transcription` off), include the field name in `locked_fields`; non-listed zero values stay open for the browser to fill in.",
        "operationId": "createRealtimeSession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RealtimeSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RealtimeSessionResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Mint realtime ephemeral ticket",
        "tags": [
          "Realtime"
        ]
      }
    },
    "/v3/rerank": {
      "post": {
        "description": "Reorder `documents` by relevance to `query` and get them back most-relevant first. `model`, `query` and `documents` are required; `top_n` caps how many results come back (integer \u003e=1; default: all). `top_k` is a compatibility alias (zero means unspecified); positive values must match when both fields are supplied, and `return_documents` echoes each document's text alongside its score. Up to 1000 documents per call. Billed per call or per token depending on the endpoint: `usage.cost` is what was charged, `usage.total_tokens` the provider's count when it reports one.\n\n`model` accepts either form, and which one you send decides the routing:\n\n- a **bare model name** (e.g. `rerank-v3.5`) routes over that model's pooled endpoints and **falls over to the next one** when an endpoint fails — the case this matters for is provider rate limits, where one endpoint's quota is exhausted and another's is not.\n- a **fully-qualified id** (e.g. `aws/cohere/rerank-v3.5`) pins that exact endpoint and never falls over.\n\nThe response's `model` is the endpoint that actually served the call, which for a pooled name is not necessarily the preferred one. List what is available with `GET /v3/models?type=rerank`.\n\nThe project's Comply model allowlist applies to every endpoint a bare name can route to, not only the one you named: an endpoint it forbids is never tried, not even as a fallover target. A pinned id the allowlist forbids, or a pool it empties, is refused with `403` rather than substituted. A provider that requires a signed agreement needs the organization's grant, as everywhere else: no grant, no call, and never as a fallover target.",
        "operationId": "createRerank",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RerankRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RerankResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Rerank documents",
        "tags": [
          "Rerank"
        ]
      }
    },
    "/v3/roundtable": {
      "post": {
        "description": "Send a query to multiple models in parallel and combine results using a configurable resolution strategy (summary, fast, multiple_choice).",
        "operationId": "createRoundtable",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoundtableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoundtableResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "Server-Sent Events stream. Each event is a JSON object prefixed with 'data: '.",
                  "type": "string"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "description": "Present when the caller's rules or the project's Model access lock refused the call. `reason` says which, and is the field to match on: the error's code or type is the same for all of them. `model_access_lock_blocked`: a model the lock refuses. `model_allowlist_blocked`: a model a rule refuses. `model_list_blocked`: a model the rules allow but the model list for API keys leaves out, while its owner limits calls to that list (Settings \u003e API keys \u003e Settings). `tool_access_lock_blocked` and `tool_allowlist_blocked`: one of Opper's own tools (web search, web fetch) the lock or a rule refuses; the model may be allowed, so another model does not help. New values may be added; treat an unknown one as a refusal you cannot fix by changing the request. `allowed_models_url` (a model's refusal only) is GET /v3/compat/models?view=all, the models, pools and dynamic routes the calling key may use. `docs_url` and `lock_url` (the lock's refusals) are the guide to Model access locks and the lock's page in the platform. `callable_models` (the lock's refusal of a short model name whose pooled endpoints are all outside the lock) lists the endpoints of that model on a locked route that the call can name by their id instead; absent when there is none. `list_url` (the model list's refusals) is the platform's page for the list that refused the call.",
                          "properties": {
                            "allowed_models_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "callable_models": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "docs_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "list_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "lock_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why the call was refused. Known values are listed; new ones may be added.",
                              "examples": [
                                "model_access_lock_blocked",
                                "model_allowlist_blocked",
                                "model_list_blocked",
                                "tool_access_lock_blocked",
                                "tool_allowlist_blocked"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The caller's rules or the project's Model access lock refused the call, in the Opper error shape. The status and the error's code or type are the same for every refusal; `error.details.reason` says which it was. When the models were refused for different reasons, `details` is omitted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Roundtable",
        "tags": [
          "Roundtable"
        ],
        "x-beta": true
      }
    },
    "/v3/spans": {
      "post": {
        "description": "Create a new trace span.",
        "operationId": "createSpan",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSpanResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Create span",
        "tags": [
          "Spans"
        ]
      }
    },
    "/v3/spans/{id}": {
      "delete": {
        "description": "Delete a trace span.",
        "operationId": "deleteSpan",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete span",
        "tags": [
          "Spans"
        ]
      },
      "get": {
        "description": "Get a trace span by ID.",
        "operationId": "getSpan",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSpanResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get span",
        "tags": [
          "Spans"
        ]
      },
      "patch": {
        "description": "Update an existing trace span.",
        "operationId": "updateSpan",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Update span",
        "tags": [
          "Spans"
        ]
      }
    },
    "/v3/spans/{id}/events": {
      "get": {
        "description": "List events for a span.",
        "operationId": "listSpanEvents",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by event kind (guardrail, feedback, evaluation)",
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List span events",
        "tags": [
          "Spans"
        ]
      },
      "post": {
        "description": "Record an event (guardrail, feedback, evaluation) on a span.",
        "operationId": "createSpanEvent",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Create span event",
        "tags": [
          "Spans"
        ]
      }
    },
    "/v3/subjects": {
      "get": {
        "description": "The project's subjects, newest first.",
        "operationId": "listSubjects",
        "parameters": [
          {
            "description": "Max items (default 20, max 100)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "description": "Items to skip (default 0)",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List subjects",
        "tags": [
          "Assets"
        ]
      },
      "post": {
        "description": "A subject is one face for Seedance video: a real `person`, usable once they pass a one-time liveness check (POST /v3/subjects/{id}/verification), or a `virtual` AI-generated character, usable at once. Add its images, videos and audio with POST /v3/subjects/{id}/assets, then use the asset ids as sources on POST /v3/videos with a `bytedance:ap` Seedance model. Seedance refuses real-looking faces that are not in the library. A subject and its assets list the `providers` they are registered with (one today: `bytedance:ap`); an asset works with models of those providers. Enabled per organization: ask Opper.",
        "operationId": "createSubject",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Create a subject",
        "tags": [
          "Assets"
        ]
      }
    },
    "/v3/subjects/{id}": {
      "delete": {
        "description": "Delete a subject and all its assets, here and at the provider. Videos already made are not affected.",
        "operationId": "deleteSubject",
        "parameters": [
          {
            "description": "Subject ID (subj_...)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete a subject",
        "tags": [
          "Assets"
        ]
      },
      "get": {
        "description": "A subject and its verification status.",
        "operationId": "getSubject",
        "parameters": [
          {
            "description": "Subject ID (subj_...)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get a subject",
        "tags": [
          "Assets"
        ]
      }
    },
    "/v3/subjects/{id}/assets": {
      "post": {
        "description": "Add one image, video or audio clip of the subject. Answers 202 with the asset in `queued`; it moves to `processing` (a person's media is matched to their face) and then `active` or `failed`, usually within a minute once the subject is verified. Media the provider cannot use (a link it cannot download, an unsupported format) fails on the first try with the reason in `error`. A URL must be public: a DNS name on port 443 with no credentials. Poll GET /v3/assets/{id}. Use only media of this subject: media of anyone else is refused.",
        "operationId": "createAsset",
        "parameters": [
          {
            "description": "Subject ID (subj_...)",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAssetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Add an asset to a subject",
        "tags": [
          "Assets"
        ]
      }
    },
    "/v3/subjects/{id}/verification": {
      "post": {
        "description": "Returns a link for the person only. They open it on their phone, consent and do a short liveness check; no account or login. The link works for about 30 minutes; the subject's status goes from `pending` to `verified` (or `expired`). Poll GET /v3/subjects/{id}. While a link is open, asking for another answers 409; start a new one once the subject is `expired` or `failed`. Assets added before the check wait in `queued` and are processed once the person is verified.",
        "operationId": "startSubjectVerification",
        "parameters": [
          {
            "description": "Subject ID (subj_...) of kind person",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartVerificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Start a person's verification",
        "tags": [
          "Assets"
        ]
      }
    },
    "/v3/tools/models/resolve": {
      "post": {
        "description": "Select the best model matching the given requirements and preference.",
        "operationId": "resolveModel",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelResolveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResolveResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Resolve model",
        "tags": [
          "Tools"
        ],
        "x-beta": true
      }
    },
    "/v3/tools/web/fetch": {
      "post": {
        "description": "Fetch a URL and return its content as markdown.",
        "operationId": "webFetch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebFetchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebFetchResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Web fetch",
        "tags": [
          "Tools"
        ],
        "x-beta": true
      }
    },
    "/v3/tools/web/search": {
      "post": {
        "description": "Search the web and return results with title, URL, and snippet.",
        "operationId": "webSearch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSearchResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Web search",
        "tags": [
          "Tools"
        ],
        "x-beta": true
      }
    },
    "/v3/traces": {
      "get": {
        "description": "List traces with pagination.",
        "operationId": "listTraces",
        "parameters": [
          {
            "description": "Max items to return (default 100, max 100)",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "type": "integer"
            }
          },
          {
            "description": "Number of items to skip (default 0)",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer"
            }
          },
          {
            "description": "Filter by trace name (case-insensitive substring match)",
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List traces",
        "tags": [
          "Traces"
        ]
      }
    },
    "/v3/traces/{id}": {
      "delete": {
        "description": "Delete a trace and all its spans.",
        "operationId": "deleteTrace",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete trace",
        "tags": [
          "Traces"
        ]
      },
      "get": {
        "description": "Get a trace with all its spans.",
        "operationId": "getTrace",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTraceResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get trace",
        "tags": [
          "Traces"
        ]
      }
    },
    "/v3/traces/{id}/events": {
      "get": {
        "description": "List all events across all spans in a trace.",
        "operationId": "listTraceEvents",
        "parameters": [
          {
            "description": "Generation ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by event kind (guardrail, feedback, evaluation)",
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List trace events",
        "tags": [
          "Traces"
        ]
      }
    },
    "/v3/videos": {
      "post": {
        "description": "Submit a deterministic video-generation job. Returns immediately with a generation id and a status URL to poll; the video is produced asynchronously. `model` (an id from GET /v3/videos/models) and `prompt` are required. `seconds`, `resolution` and `aspect_ratio` are normalized across providers; everything in `parameters` is forwarded verbatim, and each model lists the keys it takes in `params.video.parameters`. `image`/`last_image`/`video`/`reference_images`/`reference_videos`/`reference_audios`/`audio` accept an http(s) URL, a data-URI, or a `file_\u003cid\u003e` (resolved per provider), and each needs the matching capability on the model (see GET /v3/videos/models), else 400. Set `store: true` to also save the output to /v3/files and get a reusable `file_id` on the status poll; nothing is stored otherwise. Poll the returned `status_url` (GET /v3/artifacts/{id}/status) for a presigned download URL when complete, or set `callback_url` to get a signed webhook when the job ends (see GET /v3/webhooks/secret).",
        "operationId": "createVideo",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Generate a video",
        "tags": [
          "Videos"
        ]
      }
    },
    "/v3/videos/models": {
      "get": {
        "description": "List the models usable with `POST /v3/videos`: a `type=video` view of the model catalog. Same shape and query params as `/v3/models` (search, `include`, pagination), but always scoped to video models. Each item is one provider's serving of a model, and its `id` is what `model` takes; a bare name such as `seedance-2.5` is not accepted. `capabilities` gates the inputs: `video_generation` is text-to-video, `image_to_video` takes `image`, `last_frame` takes `last_image`, `reference_images` takes `reference_images`, `video_editing` / `video_extension` / `reference_video` take `video`, `reference_video` also takes `reference_videos`, `reference_audio` takes `reference_audios`, and `audio_to_video` takes `audio` (`lip_sync`: the audio drives the clip and the prompt is optional). `params.video` lists each model's accepted `aspect_ratios`, `resolutions`, `max_duration`, `min_duration` and fixed `durations`, and `params.video.parameters` the provider settings `parameters` takes, with descriptions. `pricing` gives the per-second rates, by `resolution` (and `audio`) where they differ. Paginated: 50 rows per page by default. While the response's `has_more` is true, request again with `offset` set to `next_offset`. Narrow the list with the filters (for example `q`, `type`, `capability` or `provider`) instead of reading every page.",
        "operationId": "listVideoModels",
        "parameters": [
          {
            "description": "Comma-separated list of optional fields to attach to each item. Supported: `maker` (public), `route` (requires API key), `benchmarks` (public), `policy` (requires API key — per-item comply allowlist verdict), `editorial` (public: the model's `short_description` and `long_description`).",
            "in": "query",
            "name": "include",
            "schema": {
              "example": "maker",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of a model's id, name, description or alias. Dots, dashes, underscores, colons, slashes and spaces are also ignored on both sides from the start of a word, so `gpt-5-1`, `gpt 5.1` and `gpt5.1` all find `gpt-5.1`.",
            "in": "query",
            "name": "q",
            "schema": {
              "example": "claude-sonnet",
              "type": "string"
            }
          },
          {
            "description": "Filter by provider (company) slug as published in each item's `provider.slug` (e.g. `openai`, `google`, `pruna`).",
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by capability (repeatable), e.g. `image_to_video`. Items matching ALL listed capabilities are returned.",
            "in": "query",
            "name": "capability",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Set to `true` to include retired models in results.",
            "in": "query",
            "name": "deprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Field to sort by (`id`, `name`, `provider`, `cost`, `speed`, `quality`). Default `id`.",
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "id",
              "type": "string"
            }
          },
          {
            "description": "`asc` (default) or `desc`.",
            "in": "query",
            "name": "order",
            "schema": {
              "default": "asc",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Page size. A non-positive value returns all rows from offset.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [],
        "summary": "List video models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v3/webhooks/secret": {
      "get": {
        "description": "The secret that signs the completion webhooks of this project's async jobs (see `callback_url` on POST /v3/videos and POST /v3/images), made on first use. One secret per project, taken from the API key. Keep it server-side: whoever holds it can sign a webhook your endpoint accepts. Responses are not cached (`Cache-Control: no-store`).",
        "operationId": "getWebhookSecret",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "previous_valid_until": {
                          "description": "Set after a rotation: until then webhooks also carry a signature made with the previous secret.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "secret": {
                          "description": "`whsec_` and the base64 of the key bytes, the form Standard Webhooks libraries take.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "secret",
                        "created_at"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get the webhook signing secret",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v3/webhooks/secret/rotate": {
      "post": {
        "description": "Replace the project's webhook signing secret. For 24 hours webhooks carry two signatures, one with the new secret and one with the previous, so your endpoint can switch without dropping a delivery; after that only the new one signs. Rotating again within the 24 hours retires the previous secret at once. Needs a key whose owner may manage the project's keys (an organization admin or owner), else 403.",
        "operationId": "rotateWebhookSecret",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "previous_valid_until": {
                          "description": "Set after a rotation: until then webhooks also carry a signature made with the previous secret.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "secret": {
                          "description": "`whsec_` and the base64 of the key bytes, the form Standard Webhooks libraries take.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "secret",
                        "created_at"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Rotate the webhook signing secret",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v3/webhooks/settings": {
      "get": {
        "description": "The project's webhook settings: `default_url`, where an async job or batch submitted without a `callback_url` (POST /v3/videos, POST /v3/images with `async: true`, POST /v3/batches) sends its webhook. A `callback_url` on the request always wins.",
        "operationId": "getWebhookSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "default_url": {
                          "description": "Where a job submitted without a `callback_url` sends its webhook; null when the project has none.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "default_url_updated_at": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": [
                        "default_url"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get the webhook settings",
        "tags": [
          "Webhooks"
        ]
      },
      "patch": {
        "description": "Set the project's `default_url`, or clear it with `null`. The URL goes through the same checks as a job's `callback_url` (400 names the rule it broke). From then on every async video and image job and every batch of the project that names no `callback_url` sends its webhook there. Needs a key whose owner may manage the project's keys (an organization admin or owner), else 403.",
        "operationId": "updateWebhookSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "default_url": {
                    "description": "An https URL, or null to clear it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "default_url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "default_url": {
                          "description": "Where a job submitted without a `callback_url` sends its webhook; null when the project has none.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "default_url_updated_at": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": [
                        "default_url"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Update the webhook settings",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v3/webhooks/test": {
      "post": {
        "description": "Send one signed `webhook.test` event to `callback_url` now, to check that your endpoint is reachable and verifies signatures, without running a job. The URL goes through the same checks as a job's `callback_url` (400 names the rule it broke), and the event is signed with the project's secret like any other. One attempt, no retries: the answer says whether your endpoint took it (`delivered`, a 2xx), its `status_code`, or what went wrong. At most 10 a minute per project (429).",
        "operationId": "testWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "The https URL to POST the test event to.",
                    "type": "string"
                  }
                },
                "required": [
                  "callback_url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "delivered": {
                          "description": "Your endpoint answered 2xx.",
                          "type": "boolean"
                        },
                        "duration_ms": {
                          "type": "integer"
                        },
                        "error": {
                          "description": "What went wrong, when not delivered.",
                          "type": "string"
                        },
                        "status_code": {
                          "description": "What your endpoint answered; absent when no answer came.",
                          "type": "integer"
                        },
                        "webhook_id": {
                          "description": "The webhook-id header the event carried.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "delivered",
                        "webhook_id",
                        "duration_ms"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized - missing or invalid API key"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Send a test webhook",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "Production",
      "url": "https://api.opper.ai"
    },
    {
      "description": "Local development",
      "url": "http://localhost:8080"
    }
  ],
  "tags": [
    {
      "description": "OpenAI-compatible chat completions",
      "name": "Chat"
    },
    {
      "description": "OpenAI Responses API compatible endpoint",
      "name": "Responses"
    },
    {
      "description": "Google-compatible interactions endpoint",
      "name": "Interactions"
    },
    {
      "description": "Model registry and capabilities",
      "name": "Models"
    },
    {
      "description": "Synchronous image generation",
      "name": "Images"
    },
    {
      "description": "Text-to-speech and speech-to-text",
      "name": "Audio"
    },
    {
      "description": "Asynchronous video generation",
      "name": "Videos"
    },
    {
      "description": "Realtime WebSocket sessions and their ephemeral tickets",
      "name": "Realtime"
    },
    {
      "description": "Many requests on a provider's batch API at the batch price",
      "name": "Batches"
    },
    {
      "description": "Reusable file storage for media inputs and generated outputs",
      "name": "Files"
    },
    {
      "description": "Async generation status and downloads",
      "name": "Artifacts"
    },
    {
      "description": "Signed completion webhooks for async jobs, and the project secret that signs them",
      "name": "Webhooks"
    },
    {
      "description": "OpenAI-compatible embeddings",
      "name": "Embeddings"
    },
    {
      "description": "Recorded HTTP request/response generations",
      "name": "Generations"
    },
    {
      "description": "System health and status",
      "name": "System"
    },
    {
      "description": "Roundtable endpoint — fan out a query to multiple LLMs and combine results",
      "name": "Roundtable"
    },
    {
      "description": "Web search, fetch, and other utility tools",
      "name": "Tools"
    },
    {
      "description": "Caller identity, credits, and usage",
      "name": "Account"
    },
    {
      "description": "Programmatic project and API-key management. Authenticates with an `op-mak-…` management token; available on the control_plane and enterprise plans.",
      "name": "Management"
    }
  ],
  "webhooks": {
    "jobCompleted": {
      "post": {
        "description": "Sent once when an async job or a batch ends (POST /v3/videos, POST /v3/images with `async: true`, POST /v3/batches), to its `callback_url` or, without one, the project's default webhook URL, after its status is written, so a GET of `status_url` on receipt shows the same state.\n\n**Events**: `video.completed`, `video.failed`, `image.completed`, `image.failed`, and for a batch `batch.completed`, `batch.failed`, `batch.cancelled`, `batch.expired`. A receiver that takes only some of them should check `type` and answer 2xx to the rest.\n\n**Headers** ([Standard Webhooks](https://www.standardwebhooks.com)): `webhook-id` is `\u003cgeneration id\u003e:\u003cevent type\u003e`, the same on every attempt, so drop a delivery whose id you have already handled. `webhook-timestamp` is the attempt's Unix time in seconds. `webhook-signature` is `v1,\u003cbase64 HMAC-SHA256\u003e` over `\u003cwebhook-id\u003e.\u003cwebhook-timestamp\u003e.\u003craw body\u003e`, keyed with the base64-decoded part of the secret after `whsec_`; for 24 hours after a rotation (POST /v3/webhooks/secret/rotate) it carries two space-separated signatures, one per secret, and either matching is enough. `User-Agent` is `Opper-Webhooks/1`.\n\n**Verify** with any Standard Webhooks library (`new Webhook(secret).verify(body, headers)`), or by hand: recompute the signature over the raw body, compare in constant time, and refuse a timestamp more than 5 minutes from your clock.\n\n**Answer** 2xx within 10 seconds; do the work afterwards. The body you send back is ignored. Redirects are not followed.\n\n**Retries**: a timeout, a network error, 408, 429 or 5xx is retried up to 8 attempts in all, about 1 minute, 5 minutes, 30 minutes, 1, 3, 6 and 12 hours apart (about 23 hours in all). Any other 4xx or a 3xx ends delivery at once. GET /v3/artifacts/{id}/status (a batch: GET /v3/batches/{id}) reports the delivery under `webhook` (`pending`, `delivered` or `failed`, attempts, last status code).\n\n**Payload**: no prompt and no media bytes. For a batch, `data` is the batch object GET /v3/batches/{id} returns, without its results (fetch `status_url` for them). For a media job, `data` is what the status poll returns; `data.url` is a download link valid until `data.expires_at` (1 hour from the attempt). After that, GET `status_url` for a fresh one. If the result has already been deleted (24 hours after the job, 1 hour on a zero-retention project, or DELETE /v3/artifacts/{id}), `data` has no `url`.",
        "operationId": "jobCompletedWebhook",
        "parameters": [
          {
            "description": "`\u003cgeneration id\u003e:\u003cevent type\u003e`, stable across attempts.",
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unix seconds of this attempt.",
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`v1,\u003cbase64\u003e`, space-separated when two secrets sign.",
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "created_at": {
                    "description": "When the job or batch ended.",
                    "format": "date-time",
                    "type": "string"
                  },
                  "data": {
                    "description": "The status poll's object for a media job; the batch object (without results) for a batch event.",
                    "oneOf": [
                      {
                        "properties": {
                          "created_at": {
                            "description": "When the job was submitted (only while processing).",
                            "type": "string"
                          },
                          "deadline_at": {
                            "description": "When a video job gives up (only while processing). A job still running then fails with `error_type` `timeout`, unbilled, and its webhook is sent. The deadline covers the provider's queue as well as the render, and depends on the provider (1 hour by default, 2 hours on providers that queue jobs when busy).",
                            "format": "date-time",
                            "type": "string"
                          },
                          "error": {
                            "description": "Error message (only when failed)",
                            "type": "string"
                          },
                          "error_type": {
                            "description": "Failure category (only when failed): `invalid_request` (the provider refused the request; `error` says why), `content_policy`, `rate_limited` (retry later), `provider_unavailable` (the provider could not serve the job; retry or use another model), `provider_error` (the provider failed the render), `timeout` (the job reached `deadline_at` before the provider finished it; it was cancelled at the provider where the provider allows it, and is not billed), `internal_error`, `interrupted`, or a Model access lock refusal.",
                            "type": "string"
                          },
                          "expires_at": {
                            "description": "When `url` stops working (1 hour after it was made).",
                            "format": "date-time",
                            "type": "string"
                          },
                          "file_id": {
                            "description": "Persisted /v3/files id for the output (only when completed and the job set store=true)",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "mime_type": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "processing",
                              "completed",
                              "failed"
                            ],
                            "type": "string"
                          },
                          "store_skipped": {
                            "description": "Why a requested store did not happen (e.g. skipped-quota-exceeded); empty when stored or when store was not requested",
                            "type": "string"
                          },
                          "url": {
                            "description": "Presigned download URL (only when completed), valid until `expires_at`.",
                            "type": "string"
                          },
                          "usage": {
                            "description": "What the generation was billed (only when completed).",
                            "properties": {
                              "cost": {
                                "description": "USD charged",
                                "type": "number"
                              },
                              "images": {
                                "type": "integer"
                              },
                              "seconds": {
                                "description": "Video seconds billed",
                                "type": "number"
                              },
                              "size": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      {
                        "$ref": "#/components/schemas/BatchObject"
                      }
                    ]
                  },
                  "id": {
                    "description": "The generation id POST /v3/videos or /v3/images returned, or the batch id POST /v3/batches returned.",
                    "type": "string"
                  },
                  "status_url": {
                    "description": "GET /v3/artifacts/{id}/status for a fresh download link; for a batch, GET /v3/batches/{id}, which carries the results.",
                    "type": "string"
                  },
                  "type": {
                    "enum": [
                      "video.completed",
                      "video.failed",
                      "image.completed",
                      "image.failed",
                      "batch.completed",
                      "batch.failed",
                      "batch.cancelled",
                      "batch.expired"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id",
                  "created_at",
                  "status_url",
                  "data"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any 2xx within 10 seconds ends delivery."
          }
        },
        "summary": "Async job ended",
        "tags": [
          "Webhooks"
        ]
      }
    }
  }
}